Recognise the PDB/CIF file for the protein structures from RCSB website



  • The RCSB website contains the protein structure files in PDB or CIF format. There is no defined languages in Notepad++ that can recognise them. I would like to open then in the Notepad++, and fold/expand a same section so that it is easier for me to handle the very long text files. Can I ask if there is already a user-defined language for PDB and CIF?

    For example
    https://www.rcsb.org/structure/6S2C
    Snipaste_2020-04-29_09-51-52.jpg



  • @Zhang-Cheng,

    Looking, I see they are both text formats, so it’s not impossible.

    I cannot find any in the official repo, but that’s not to say they don’t exist somewhere on the interwebs

    But apparently, there should be. 😁

    If there is a start/stop pair of keywords or symbols for defining folding, we could help you craft an initial simple UDL.

    But I, at least, don’t know enough about the formats to know what should indicate folding start/stop. And my phone isn’t the best tool for trying to find more details, or implement a UDL 😉



  • You can try to create a UDL definition for PDB file format.
    However PDB is not a programming language so I tried to use the comment folding to achieve your need.
    Create a file pdb.xml (as below) and put it in userDefineLangs folder

    <NotepadPlus>
        <UserLang name="PDB Protein Data Bank" ext="pdb" udlVersion="2.1">
            <Settings>
                <Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="1" decimalSeparator="0" />
                <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="yes" Keywords6="no" Keywords7="no" Keywords8="no" />
            </Settings>
            <KeywordLists>
                <Keywords name="Comments">00SOURCE 00REMARK 00HELIX 00SEQRES 00ATOM 00SHEET 01 02 03 04</Keywords>
                <Keywords name="Numbers, prefix1"></Keywords>
                <Keywords name="Numbers, prefix2"></Keywords>
                <Keywords name="Numbers, extras1"></Keywords>
                <Keywords name="Numbers, extras2"></Keywords>
                <Keywords name="Numbers, suffix1"></Keywords>
                <Keywords name="Numbers, suffix2"></Keywords>
                <Keywords name="Numbers, range"></Keywords>
                <Keywords name="Operators1"></Keywords>
                <Keywords name="Operators2"></Keywords>
                <Keywords name="Folders in code1, open"></Keywords>
                <Keywords name="Folders in code1, middle"></Keywords>
                <Keywords name="Folders in code1, close"></Keywords>
                <Keywords name="Folders in code2, open"></Keywords>
                <Keywords name="Folders in code2, middle"></Keywords>
                <Keywords name="Folders in code2, close"></Keywords>
                <Keywords name="Folders in comment, open"></Keywords>
                <Keywords name="Folders in comment, middle"></Keywords>
                <Keywords name="Folders in comment, close"></Keywords>
                <Keywords name="Keywords1">HEADER KEYWDS </Keywords>
                <Keywords name="Keywords2">TITLE KEYWDS REVDAT AUTHOR  CISPEP COMPND DBREF</Keywords>
                <Keywords name="Keywords3">ALA ARG ASN ASP CYS GLN GLU GLY HIS ILE LEU LYS MET PHE PRO SER THR TRP TYR VAL</Keywords>
                <Keywords name="Keywords4">EXPDTA JRNL</Keywords>
                <Keywords name="Keywords5">ORIGX SCALE  CRYST </Keywords>
                <Keywords name="Keywords6"></Keywords>
                <Keywords name="Keywords7"></Keywords>
                <Keywords name="Keywords8"></Keywords>
                <Keywords name="Delimiters"></Keywords>
            </KeywordLists>
            <Styles>
                <WordsStyle name="DEFAULT" fgColor="FFFFFF" bgColor="000000" fontStyle="0" nesting="0" />
                <WordsStyle name="COMMENTS" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="LINE COMMENTS" fgColor="FFFFFF" bgColor="000000" fontStyle="0" nesting="67369984" />
                <WordsStyle name="NUMBERS" fgColor="00FFFF" bgColor="000000" fontStyle="0" nesting="0" />
                <WordsStyle name="KEYWORDS1" fgColor="FF0000" bgColor="400000" fontStyle="1" nesting="0" />
                <WordsStyle name="KEYWORDS2" fgColor="00FF80" bgColor="000000" fontStyle="0" nesting="0" />
                <WordsStyle name="KEYWORDS3" fgColor="FFFF80" bgColor="000000" fontStyle="1" nesting="0" />
                <WordsStyle name="KEYWORDS4" fgColor="C0C0C0" bgColor="000000" fontStyle="0" nesting="0" />
                <WordsStyle name="KEYWORDS5" fgColor="00FF80" bgColor="000000" fontStyle="0" nesting="0" />
                <WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="KEYWORDS7" fgColor="FF0080" bgColor="000000" fontStyle="0" nesting="0" />
                <WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="FOLDER IN CODE2" fgColor="FF8040" bgColor="000000" fontStyle="0" nesting="0" />
                <WordsStyle name="FOLDER IN COMMENT" fgColor="FF8040" bgColor="000000" fontStyle="0" nesting="0" />
                <WordsStyle name="DELIMITERS1" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="DELIMITERS2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
            </Styles>
        </UserLang>
    </NotepadPlus>
    

Log in to reply