schrodinger.application.matsci.automated_martini_mapping_protein module¶
Map an all-atom protein structure to a coarse-grained one compatible with the Martini force field.
Copyright Schrodinger, LLC. All rights reserved.
- exception schrodinger.application.matsci.automated_martini_mapping_protein.OverlapError¶
Bases:
Exception
Error to raise when an atom is found in two different residue matches
- exception schrodinger.application.matsci.automated_martini_mapping_protein.MissingAtoms¶
Bases:
Exception
Exception raised when mapping fails.
- exception schrodinger.application.matsci.automated_martini_mapping_protein.MissingSecondaryStructure¶
Bases:
Exception
Exception raised when secondary structure is missing.
- class schrodinger.application.matsci.automated_martini_mapping_protein.CGStructBuilder(aa_struct, cg_struct, mapping_info)¶
Bases:
object
Create a coarse-grained structure based on all-atom structure’s mapping
- __init__(aa_struct, cg_struct, mapping_info)¶
Create an instance.
- Parameters
aa_struct (structure.Structure) – The all-atom structure
cg_struct (structure.Structure) – The coarse-grained structure
mapping_info (dict) – The protin’s martini mapping information
- createCGStruct(all_hits)¶
Create a coarse-grained structure.
- Parameters
all_hits (dict) – The mapping information
- Return type
- Returns
The coarse-grained structure
- largestInternalDist()¶
Find the largest distance between any two atoms in the CG structure.
- Return type
float
- Returns
The largest distance between any two atoms
- addBackmapping(caps, mapped_atoms)¶
Record parent AA information on CG structure to aid in future reconstruction of the AA structure from the CG structure. Per each CG site type, store AA structure extract as CG structure property and record bonding information in CG particle atom properties. Also record as structure property the structure and bonding of terminal capping groups not corresponding to any particle.
- Parameters
caps (dict) – Collection of the capping groups
mapped_atoms (dict) – Mappings of the CG particle index to the corresponding AA atom index
- findCapNeighbors(caps, mapped_atoms)¶
Find the neighbors of the capping groups. Add the capping group information to the coarse-grained structure.
- Parameters
caps (dict) – Collection of the capping groups
mapped_atoms (dict) – Mappings of the CG particle index to the
- Return type
list(tuple)
- Returns
Contains the capping group and its neighbor particle atom name
- adjustHelixTerminal()¶
Correct for Martini’s use of slightly different site types for terminal neutral backbone sites in helices.
- findNTerminae()¶
Find the N-termini of the CG structure.
- Return type
list(structure.Atom)
- Returns
Contains the N-terminal atoms of the CG structure
- findCTerminae()¶
Find the C-termini of the CG structure.
- Return type
list(structure.Atom)
- Returns
Contains the C-terminal atoms of the CG structure
- findBackboneChains()¶
Find the backbone chains in the CG structure.
- Return type
list(list(structure.Atom))
- Returns
Contains the backbone chains in the CG structure
- static isBackboneAtom(name)¶
Check if the atom is a backbone atom.
- Parameters
str – The atom name
- Return type
bool
- Returns
True if the atom is a backbone atom, False otherwise
- addNewSite(a_site, site_info, a_match, a_residue, atom_idx, mapped_atoms, internal_sites)¶
Add a new site to the coarse-grained structure.
- Parameters
a_site (str) – The site type
site_info (dict) – The site information from the mapping json file
a_residue (str) – Residue name as key from the json file
a_match (list(int)) – The atom indices from the AA structure matching to the site type SMARTS pattern
atom_idx (int) – The atom index from the AA structure
mapped_atoms (dict) – Mappings of the CG particle index to the corresponding AA atom index
internal_sites (dict) – The internal bonds for the site
- createNewSite(atom_idx, a_residue, a_residue_info, a_match, mapped_atoms, caps)¶
Create a new site in the coarse-grained structure.
- Parameters
atom_idx (int) – The atom index from the AA structure
a_residue (str) – Residue name as key from the json file
a_residue_info (dict) – Contains residue SMARTS pattern, external bonding information, site mappings, colors, and names for different bead types.
a_match (list(int)) – The atom indices from the AA structure matching to the site type SMARTS pattern
mapped_atoms (dict) – Mappings of the CG particle index to the corresponding AA atom index
caps (dict) – Collection of the capping groups
- Return type
list
- Returns
atoms which should not be mapped if mapped particle is Nothing
- addBonds(a_residue_info, a_match, mapped_atoms, internal_sites)¶
Add bonds to the coarse-grained structure.
- Parameters
a_residue_info (dict) – residue information from the mapping json file
a_match (list(int)) – The atom indices from the AA structure
mapped_atoms (dict) – Mappings of the CG particle index to the
internal_sites (dict) – The internal bonds for the site
- getCutBonds(parent_atoms)¶
Collect the bonds of parent atoms that are cut, because of CG mapping.
- Parameters
parent_atoms (list) – The parent atoms
- Return type
list(tuple(int, int, int))
- Returns
list of AA bonds that are cut
- getCommonValueProp(parent_atoms, property_name)¶
Find the most common value of a property among parent atoms.
- Parameters
parent_atoms (list) – The parent atoms
property_name (str) – The property name
- Return type
str
- Returns
The most common value of the property among parent atoms
- class schrodinger.application.matsci.automated_martini_mapping_protein.Mapper(mapping_info, aa_struct)¶
Bases:
object
Mapper class to find mapping between all-atom and coarse-grained structures.
- __init__(mapping_info, aa_struct)¶
Create an instance.
- Parameters
mapping_info (dict) – The protein’s Martini mapping information
aa_struct (structure.Structure) – The all-atom structure
- determineMapping()¶
Determine the mapping, using the Martini mapping information.
- cleanHTerminals()¶
Clean unmapped H atoms bound to the N terminal N atom of a protein backbone
- storeMatchingHits()¶
Store matched atoms in a dictionary.
- Raises
OverlapError – If an atom is found in two different residue matches
- Return type
dict
- Returns
A dictionary of atom index and the residue, residue info, and match that the atom is in
- checkMatchesContained()¶
Find matches that are subsets of other matches and eliminate them.
- static convertAlternateHtoCaps(res_info, H_Nterminal_info)¶
For most residues in chain the N terminus would be R’-NH-R’’ and the SMARTS patterns have only 1 H on the terminal N. This leads to two matches for the same residue but involving different H atoms. This function removes one of the two matches for backbone N terminations with NH2-R for proteins and places the unmapped hydrogen into a new unmapped group for backmapping
- Parameters
res_info (dict) – information on a residue
H_Nterminal_info (dict) – information on unmapped H atoms for terminal
- static removeFirstH(res_info, H_Nterminal_info)¶
For most Proline residues in a chain the N terminus would be R’-N(-R’’)-R’’’ and the SMARTS patterns have no H on the terminal N. For prolines at the N terminus of a protein backbone chain sometimes this site is neutral (i.e., there is an H on the N atom) and this can lead to an unmapped H atom. A pattern has been added for such proleins and they map onto normal PRO Martini sites. The unmapped H atom needs to be tracked for recording backmapping information.
- Parameters
a_residue_info (dict) – info on a N-terminal PRO residue
H_Nterminal_info (dict) – info on unmapped H atoms for terminal residues
- class schrodinger.application.matsci.automated_martini_mapping_protein.AutomatedMartiniProteinMapping(struct, keep_secondary_structure)¶
Bases:
object
Class to map an AA structure to a CG structure using the Martini mapping defined for protein residues.
- __init__(struct, keep_secondary_structure)¶
Generate the CG structure from the AA structure. Using the residues in the mapping file, search the AA structure for matches, map the AA atom indices to a CG particle, generate and store the particles in a CG structure.
- Parameters
struct (structure.Structure) – the AA structure to be coarse grained
keep_secondary_structure (bool) – retain the input protein secondary structure or not
- Return type
- Returns
The CG structure
- map()¶
Map the AA structure to the CG structure
- Return type
- Returns
The CG structure