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:
ExceptionError to raise when an atom is found in two different residue matches
- exception schrodinger.application.matsci.automated_martini_mapping_protein.MissingSecondaryStructure¶
Bases:
ExceptionException raised when secondary structure is missing.
- exception schrodinger.application.matsci.automated_martini_mapping_protein.AdditionalRestraintsError¶
Bases:
ExceptionException raised when additional restraints cannot be applied.
- class schrodinger.application.matsci.automated_martini_mapping_protein.Mapper(residues_info, aa_struct)¶
Bases:
objectMapper class to find mapping between all-atom and coarse-grained structures.
- class PARTICLE_INFO(atom_idxs, cen_on_idxs, color, charge, bond_id, resid, parent_chain_name, parent_residue_num, parent_residue_name, parent_mapped_resname)¶
Bases:
tuple- atom_idxs¶
Alias for field number 0
- bond_id¶
Alias for field number 4
- cen_on_idxs¶
Alias for field number 1
- charge¶
Alias for field number 3
- color¶
Alias for field number 2
- parent_chain_name¶
Alias for field number 6
- parent_mapped_resname¶
Alias for field number 9
- parent_residue_name¶
Alias for field number 8
- parent_residue_num¶
Alias for field number 7
- resid¶
Alias for field number 5
- __init__(residues_info, aa_struct)¶
Create an instance.
- Parameters:
residues_info (dict) – The protein’s Martini mapping information per residue type.
aa_struct (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
- defineParticles()¶
Define the particles based on mapping information from the residues.
- processBonds()¶
Process the internal bonds information from the json file. Assign a bond index to every site in the definition of a residue. Matching bond indexes will be used to identify pairs that should be bonded, after particles are defined.
- getAParticle(a_match, a_site, site_info, resname)¶
Get the particle information for a match.
- Parameters:
a_match (list(int)) – The atom indices of the match
a_site (str) – The site name from json mapping file
site_info (dict) – The mapping info for the given site from json file
res_info (dict) – The residue information from json mapping file
- Return type:
tuple(str, int, PARTICLE_INFO)
- Returns:
The particle name, number, and self.PARTICLE_INFO object storing the particle information
- 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
- storeCaps(a_match, a_site, site_info, res_info)¶
Store the capping atoms information.
- Parameters:
a_match (list) – The atom indices of the match
a_site (str) – The site name from json mapping file
site_info (dict) – The site information from json mapping file
res_info (dict) – The residue information from json mapping file
- static particleNameAndColor(a_site, site_info, a_atom)¶
Get the particle name based on the site type.
- Parameters:
a_site (str) – The site name
site_info (dict) – The site information
a_atom (Structure) – An atom corresponding to this site
- Return type:
tuple(str, str)
- Returns:
The particle name and its color
- 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)¶
Bases:
objectClass to map an AA structure to a CG structure using the Martini mapping defined for protein residues.
- MULTI_MOL = 1¶
- __init__(struct)¶
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.
- map()¶
Map the AA structure to the CG structure
- Return type:
- Returns:
The AA structure that is tagged with the CG mapping information
- mapAAStructure(mapped_particles, cap_atoms, ignored_atoms)¶
Map the AA structure to the CG structure using the mapped particles.
- Parameters:
mapped_particles (dict) – The particles mapping information
cap_atoms (dict) – The capping atoms information
ignored_atoms (list[atom]) – The atoms that are not mapped to any particle
- addAtomProp(atom_idxs, props_values)¶
Add the other atom properties to the AA structure.
- Parameters:
atom_idxs (list) – The atom indices to add the property to
props_values (dict) – The properties the their values to add to each atom
- addCappingStructProperties(cap_atoms)¶
Add the capping properties to the AA structure.
- Parameters:
cap_atoms (dict) – The capping atoms information
- addParticleInfo(name, group, pattern, charge)¶
Add the particle information to the particles_info list.
- Parameters:
name (str) – The particle name
group (list) – The atom indices of the particle in the AA structure
pattern (Pattern) – The pattern to convert the atom indices to a SMARTS pattern
charge (int) – The particle charge
- addMappingAtomProperties(name, num, group)¶
Add the mapping properties to the AA structure.
- Parameters:
name (str) – The particle name
num (int) – The particle number
group (list) – The atom indices of the particle in the AA structure
- class schrodinger.application.matsci.automated_martini_mapping_protein.StructuralHarmonicRestraints(struct, force_constant=3.585, target_distance=10.0)¶
Bases:
objectClass to generate harmonic restraints on the protein backbone atoms
- STRANDS_FC_KEY = 'force_constant'¶
- STRANDS_MIN_ANGLE_KEY = 'minimum_angle'¶
- STRANDS_APPLY_KEY = 'apply'¶
- MOL_GROUPS_KEY = 'groups'¶
- STRAND_RESTRAINTS_KEY = 'strand_restraints'¶
- EXCLUDE_RESTRAINTS_KEY = 'exclude_restaints_between_group_of_sites'¶
- EXTRA_SITES_RESTRAINTS_KEY = 'restrain_other_sites_in_protein_molecules'¶
- GROUP_MEMBERS_KEY = 'group_members'¶
- ATOMI_KEY = 'atom_i'¶
- ATOMJ_KEY = 'atom_j'¶
- DIST_KEY = 'distance'¶
- FC_KEY = 'fc'¶
- REST_BLOCK_SEP = ';'¶
- REST_PARAM_SEP = ','¶
- DEFAULT_FC = 3.585¶
- DEFAULT_RC = 10.0¶
- STRAND_TURN = 'strand_turn'¶
- __init__(struct, force_constant=3.585, target_distance=10.0)¶
Generate harmonic restraints on the protein backbone atoms
- Parameters:
struct (Structure) – input cg structure
force_constant (float) – harmonic restraints’ force constant (kcal/mol/A^2)
target_distance (float) – largest distance (A) between backbone protein particles to be restrained
- static isProtMapped(struct)¶
Check if the structure is a mapped protein structure.
- Parameters:
struct (Structure) – The structure to check
- Return type:
bool
- Returns:
True if the structure is a mapped protein structure
- addRelativeBackboneSiteProperties()¶
Add the previous backbone site property to each backbone atom in the structure.
- addHarmonicRestraints()¶
Add harmonic restraints to the protein based on the restraints defined in the json file
- Return type:
- Returns:
The CG structure with restraints added as atom properties
- createRestraints()¶
Create the harmonic restraints
- storeRestraintsOnStruct()¶
Store the restraints on the structure as atom properties
- otherRestraints(mol, backbone)¶
Create the harmonic restraints for other particles that are not part of the backbone or a strand
- strandRestraints(backbone)¶
Create the harmonic restraints for the strands. In principle there should be a dihedral potential between side_chain(i)-backbone(i)-backbone(i+1)-side_chain(i+1) particles at the input geometry. Dihedrals were problematic when this was implemented so a distance restraint is applied between the input side chain particles to maintain the current geometry. This restraint is problematic if the dihedral angle is less than a certain value. The minimum_angle specifies this value and dihedrals less than this value are not restrained.
- sideChainS1(atom)¶
Find the side chain S1 atom for the given atom index
- Parameters:
atom (structure.Atom) – The atom
- Return type:
schrodinger.structure.atom.Atom or None
- Returns:
The side chain S1 atom, or None if not found
- backboneRestraints(backbone)¶
Create the harmonic restraints between backbone particles
- Parameters:
backbone (list) – The backbone atoms
- isInExcludedGroups(atom1_idx, atom2_idx)¶
Check if the atoms are supposed to be excluded from the restraints
- Parameters:
atom1_idx (int) – The first atom index
atom2_idx (int) – The second atom index
- Return type:
bool
- Returns:
True if the atoms are supposed to be excluded
- restraintBlock(atom1_idx, atom2_idx, distance, k_spring)¶
Create a restraint block
- Parameters:
atom1_idx (int) – The first atom index
atom2_idx (int) – The second atom index
distance (float) – The distance (A)
k_spring (float) – The force constant (kcal/mol/A^2)
- Return type:
dict
- Returns:
The restraint block
- addSingleRestraint(atom1, atom2, dist=None, k_spring=None, check_exclusion=True, check_distance_target=True)¶
Create a single restraint between two atoms
- Parameters:
atom1 (structure.Atom) – The first atom
atom2 (structure.Atom) – The second atom
dist (float) – The distance (A). If None, calculate from structure
k_spring (float) – The force constant (kcal/mol/A^2). If None, assigned by default
check_exclusion (bool) – Check if the atoms are supposed to be excluded from the restraints
check_distance_target (bool) – Check if the distance is within the target distance
- Return type:
list
- Returns:
The restraint between the two atoms
- backbone(molecule)¶
Find the backbone atoms in the protein
- Parameters:
molecule (structure.Molecule) – The molecule
- Return type:
list(schrodinger.structure.atom.Atom)
- Returns:
The backbone atoms
- excludedGroups(set_of_groups)¶
Find the groups to exclude from the restraints
- Parameters:
set_of_groups (dict) – The set of groups to exclude
- Return type:
list
- Returns:
The groups to exclude