forgi.threedee.utilities.mcannotate module¶
-
forgi.threedee.utilities.mcannotate.
format_resid
(pdb_resid)[source]¶ Convert a PDB.Chain.Residue id to an MC-Annotate formatted residue identifier.
-
forgi.threedee.utilities.mcannotate.
get_interacting_base_pairs
(line)[source]¶ Return the identification part of an interaction line of an MC-Annotate output file.
@param line: The entire interaction line @return: The first part, containing the identifiers of the interacting entities (i.e. ‘A33-B45’)
-
forgi.threedee.utilities.mcannotate.
iterate_over_interactions
(mcannotate_lines)[source]¶ Generator function for the iteration over lines in the ‘Base-pairs’ section of an MC-Annotate output file.
@param mcannotate_lines: All of the lines of an MC-Annotate output file @return: Yield only lines in the ‘Base-pairs’ section
-
forgi.threedee.utilities.mcannotate.
iterate_over_residue_list
(mcannotate_lines)[source]¶ Generator function allowing the iteration over all of the lines in the ‘Residue conformations’ section of an MC-Annotate output file.
@param mcannotate_lines: All of the lines of an MC-Annotate output file @return: Yield only lines in the ‘Residue conformations’ section
-
forgi.threedee.utilities.mcannotate.
parse_base_pair_id
(base_pair_id)[source]¶ Separate the two chain/base identifiers present in the interaction section of an MC-Annotate output file.
@param base_pair_id: The identifier string for the interacting nucleotides (i.e. ‘A33-B45’) @return: 4-tuple containing of the form (chain1, res1, chain2, res2) i.e. (‘A’, 33, ‘B’, ‘45’)
-
forgi.threedee.utilities.mcannotate.
parse_chain_base
(chain_base)[source]¶ Parse the string identifying a chain and a base in an MC-Annotate generated annotation file.
As an example, the string ‘A33’ means residue 33 on chain ‘A’.
@param chain_base: The MC-Annotate identification string (i.e. ‘A33’) @return: A pair containing the chain id and residue number (i.e. (‘A’, 33))