How to use the pdb2pqr.pdb2pqr.pdb.BaseRecord function in pdb2pqr

To help you get started, we’ve selected a few pdb2pqr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / pdb.py View on Github external
self.alt_loc_h = str.strip(line[33])
        self.chain_h = str.strip(line[35])
        self.res_seq_h = str.strip(line[36:41])
        self.i_code_h = str.strip(line[41])
        self.name2 = str.strip(line[43:47])
        self.alt_loc2 = str.strip(line[47])
        self.res_name2 = str.strip(line[48:51])
        self.chain2 = str.strip(line[52])
        self.res_seq2 = str.strip(line[53:58])
        self.i_code2 = str.strip(line[58])
        self.sym1 = str.strip(line[59:65])
        self.sym2 = str.strip(line[66:72])


@register_line_parser
class LINK(BaseRecord):
    """LINK field

    The LINK records specify connectivity between residues that is not
    implied by the primary structure. Connectivity is expressed in terms of
    the atom names. This record supplements information given in CONECT
    records and is provided here for convenience in searching.
    """

    def __init__(self, line):
        """Initialize by parsing line

        COLUMNS  TYPE   FIELD     DEFINITION
        -----------------------------------------------------
        13-16    string name1     Atom name.
        17       string alt_loc1   Alternate location indicator.
        18-20    string res_name1  Residue name.
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / pdb.py View on Github external
"""

    def __init__(self, line):
        """Initialize by parsing a line

        COLUMNS  TYPE   FIELD       DEFINITION
        --------------------------------------------------
        11-70    string technique   The experimental technique(s) with optional
                                    comment describing the sample or experiment
        """
        super(EXPDTA, self).__init__(line)
        self.technique = str.strip(line[10:70])


@register_line_parser
class KEYWDS(BaseRecord):
    """KEYWDS field

    The KEYWDS record contains a set of terms relevant to the entry. Terms
    in the KEYWDS record provide a simple means of categorizing entries and
    may be used to generate index files. This record addresses some of the
    limitations found in the classification field of the HEADER record. It
    provides the opportunity to add further annotation to the entry in a
    concise and computer-searchable fashion.
    """

    def __init__(self, line):
        """Initialize by parsing a line

        COLUMNS  TYPE   FIELD   DEFINITION
        --------------------------------------------------
        11-70    string keywds  Comma-separated list of keywords relevant to the entry
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / pdb.py View on Github external
super(TURN, self).__init__(line)
        self.seq = int(str.strip(line[7:10]))
        self.turn_id = str.strip(line[11:14])
        self.init_res_name = str.strip(line[15:18])
        self.init_chain_id = str.strip(line[19])
        self.init_seq_num = int(str.strip(line[20:24]))
        self.init_i_code = str.strip(line[24])
        self.end_res_name = str.strip(line[26:29])
        self.end_chain_id = str.strip(line[30])
        self.end_seq_num = int(str.strip(line[31:35]))
        self.end_i_code = str.strip(line[35])
        self.comment = str.strip(line[40:70])


@register_line_parser
class SHEET(BaseRecord):
    """SHEET field

    SHEET records are used to identify the position of sheets in the
    molecule. Sheets are both named and numbered. The residues where the
    sheet begins and ends are noted.
    """

    def __init__(self, line):
        """Initialize by parsing line

        COLUMNS  TYPE   FIELD       DEFINITION
        -------------------------------------------------
        8 - 10  int     strand      Strand number which starts at 1 for each
                                    strand within a sheet and increases by one.
        12 - 14  string sheet_id     Sheet identifier.
        15 - 16  int    num_strands  Number of strands in sheet.
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / pdb.py View on Github external
61-66    string record  Name of the modified record.
        """
        super(REVDAT, self).__init__(line)
        self.mod_num = int(str.strip(line[7:10]))
        self.mod_date = str.strip(line[13:22])
        self.mod_id = str.strip(line[23:28])
        self.mod_type = int(str.strip(line[31]))
        self.records = []
        self.records.append(str.strip(line[39:45]))
        self.records.append(str.strip(line[46:52]))
        self.records.append(str.strip(line[53:59]))
        self.records.append(str.strip(line[60:66]))


@register_line_parser
class AUTHOR(BaseRecord):
    """AUTHOR field

    The AUTHOR record contains the names of the people responsible for the contents of the entry.
    """

    def __init__(self, line):
        """Initialize by parsing a line

        COLUMNS  TYPE   FIELD      DEFINITION
        --------------------------------------------------
        11-70    string author_list List of the author names, separated by commas
        """
        super(AUTHOR, self).__init__(line)
        self.author_list = str.strip(line[10:70])

github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / pdb.py View on Github external
@register_line_parser
class ENDMDL(BaseRecord):
    """ ENDMDL class

    The ENDMDL records are paired with MODEL records to group individual
    structures found in a coordinate entry.
    """

    def __init__(self, line):
        # TODO - not sure what is going on here.
        super(ENDMDL, self).__init__(line)


@register_line_parser
class TER(BaseRecord):
    """ TER class

    The TER record indicates the end of a list of ATOM/HETATM records for a
    chain.
    """

    def __init__(self, line):
        """ Initialize by parsing line:

        COLUMNS  TYPE   FIELD   DEFINITION
        -------------------------------------------
        7-11     int    serial  Serial number.
        18-20    string res_name Residue name.
        22       string chain_id Chain identifier.
        23-26    int    res_seq  Residue sequence number.
        27       string ins_code   Insertion code.
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / pdb.py View on Github external
"""

    def __init__(self, line):
        """Initialize by parsing line

        COLUMNS  TYPE   FIELD  DEFINITION
        -----------------------------------------------
        13-70    string text   See Details on web.
        """
        super(JRNL, self).__init__(line)
        #TODO: What is this mess?
        self.text = str.strip(line[12:70])


@register_line_parser
class SPRSDE(BaseRecord):
    """SPRSDE field

    The SPRSDE records contain a list of the ID codes of entries that were
    made obsolete by the given coordinate entry and withdrawn from the PDB
    release set. One entry may replace many. It is PDB policy that only the
    principal investigator of a structure has the authority to withdraw it.
    """

    def __init__(self, line):
        """Initialize by parsing line

        COLUMNS  TYPE   FIELD      DEFINITION
        -----------------------------------------------
        12-20    string super_date Date this entry superseded the listed entries.
        22-25    string id_code     ID code of this entry.
        32-35    string sid_code    ID code of a superseded entry.
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / pdb.py View on Github external
def __init__(self, line):
        """Initialize by parsing line

        COLUMNS  TYPE   FIELD  DEFINITION
        -----------------------------------------------------
        12-14    string hetatm_id  Het identifier, right-justified.
        16-70    string text   Chemical name.
        """
        super(HETNAM, self).__init__(line)
        self.hetatm_id = str.strip(line[11:14])
        self.text = str.strip(line[15:70])


@register_line_parser
class HET(BaseRecord):
    """HET field

    HET records are used to describe non-standard residues, such as
    prosthetic groups, inhibitors, solvent molecules, and ions for which
    coordinates are supplied. Groups are considered HET if they are:
        - not one of the standard amino acids, and
        - not one of the nucleic acids (C, G, A, T, U, and I), and
        - not one of the modified versions of nucleic acids (+C, +G, +A, +T,
        +U, and +I), and
        - not an unknown amino acid or nucleic acid where UNK is used to
        indicate the unknown residue name.
    Het records also describe heterogens for which the chemical identity is
    unknown, in which case the group is assigned the hetatm_id UNK.
    """

    def __init__(self, line):
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / pdb.py View on Github external
super(SPRSDE, self).__init__(line)
        self.super_date = str.strip(line[11:20])
        self.id_code = str.strip(line[21:25])
        self.super_id_codes = []
        self.super_id_codes.append(str.strip(line[31:35]))
        self.super_id_codes.append(str.strip(line[36:40]))
        self.super_id_codes.append(str.strip(line[41:45]))
        self.super_id_codes.append(str.strip(line[46:50]))
        self.super_id_codes.append(str.strip(line[51:55]))
        self.super_id_codes.append(str.strip(line[56:60]))
        self.super_id_codes.append(str.strip(line[61:65]))
        self.super_id_codes.append(str.strip(line[66:70]))


@register_line_parser
class REVDAT(BaseRecord):
    """REVDAT field

    REVDAT records contain a history of the modifications made to an entry since its release.
    """

    def __init__(self, line):
        """Initialize by parsing a line.

        COLUMNS  TYPE   FIELD  DEFINITION
        -------------------------------------------------------
        8-10     int    mod_num  Modification number.
        14-22    string mod_date Date of modification (or release for new entries).
        24-28    string mod_id   Identifies this particular modification. It links
                                to the archive used internally by PDB.
        32       int    mod_type An integer identifying the type of modification.
                                In case of revisions with more than one possible
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / pdb.py View on Github external
COLUMNS  TYPE   FIELD    DEFINITION
        -----------------------------------------------------
        9-10     int    comp_num  Component number
        13-15    string hetatm_id    Het identifier
        19       string asterisk * for water
        20-70    string text     Chemical formula
        """
        super(FORMUL, self).__init__(line)
        self.comp_num = int(str.strip(line[8:10]))
        self.hetatm_id = str.strip(line[12:15])
        self.asterisk = str.strip(line[19])
        self.text = str.strip(line[19:70])


@register_line_parser
class HETSYN(BaseRecord):
    """HETSYN field

    This record provides synonyms, if any, for the compound in the
    corresponding (i.e., same hetatm_id) HETNAM record. This is to allow
    greater flexibility in searching for HET groups.
    """

    def __init__(self, line):
        """Initialize by parsing line

        COLUMNS  TYPE   FIELD         DEFINITION
        -----------------------------------------------------
        12-14    string hetatm_id         Het identifier, right-justified.
        16-70    string hetatm_synonyms   List of synonyms
        """
        super(HETSYN, self).__init__(line)
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / pdb.py View on Github external
super(CISPEP, self).__init__(line)
        self.ser_num = int(str.strip(line[7:10]))
        self.pep1 = str.strip(line[11:14])
        self.chain_id1 = str.strip(line[15])
        self.seq_num1 = int(str.strip(line[17:21]))
        self.icode1 = str.strip(line[21])
        self.pep2 = str.strip(line[25:28])
        self.chain_id2 = str.strip(line[29])
        self.seq_num2 = int(str.strip(line[31:35]))
        self.icode2 = str.strip(line[35])
        self.mod_num = int(str.strip(line[43:46]))
        self.measure = float(str.strip(line[53:59]))


@register_line_parser
class SLTBRG(BaseRecord):
    """ SLTBRG field

    The SLTBRG records specify salt bridges in the entry.
    records and is provided here for convenience in searching.
    """

    def __init__(self, line):
        """Initialize by parsing line

        COLUMNS  TYPE   FIELD     DEFINITION
        -----------------------------------------------------
        13-16    string name1     Atom name.
        17       string alt_loc1   Alternate location indicator.
        18-20    string res_name1  Residue name.
        22       string chain_id1  Chain identifier.
        23-26    int    res_seq1   Residue sequence number.