schrodinger.application.matsci.coarsegrain module

Utilities for working with coarse grain structures

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.matsci.coarsegrain.ParticleInfo(key, name, rgb, radius, mass)

Bases: tuple

__add__

Return self+value.

__class__

alias of builtins.type

__contains__

Return key in self.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__getitem__

Return self[key].

__getnewargs__()

Return self as a plain tuple. Used by copy and pickle.

__gt__

Return self>value.

__hash__

Return hash(self).

__init__

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__iter__

Implement iter(self).

__le__

Return self<=value.

__len__

Return len(self).

__lt__

Return self<value.

__module__ = 'schrodinger.application.matsci.coarsegrain'
__mul__

Return self*value.n

__ne__

Return self!=value.

static __new__(_cls, key, name, rgb, radius, mass)

Create new instance of ParticleInfo(key, name, rgb, radius, mass)

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return a nicely formatted representation string

__rmul__

Return self*value.

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__slots__ = ()
__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

count(value) → integer -- return number of occurrences of value
index(value[, start[, stop]]) → integer -- return first index of value.

Raises ValueError if the value is not present.

key

Alias for field number 0

mass

Alias for field number 4

name

Alias for field number 1

radius

Alias for field number 3

rgb

Alias for field number 2

schrodinger.application.matsci.coarsegrain.is_martini_charge_type(atype)

Return True if the given Martini type is a charge type.

Parameters:atype (str) – the Martini type
Return type:bool
Returns:True if a Martini charge type
schrodinger.application.matsci.coarsegrain.is_martini_ring_type(atype)

Return True if the given Martini type is a ring type.

Parameters:atype (str) – the Martini type
Return type:bool
Returns:True if a Martini ring type
schrodinger.application.matsci.coarsegrain.get_martini_ring_type_from_type(atype)

Return the Martini ring type from the type.

Parameters:atype (str) – the Martini type
Return type:str
Returns:the Martini ring type
schrodinger.application.matsci.coarsegrain.is_martini_antifreeze_type(atype)

Return True if the given Martini type is an antifreeze type.

Parameters:atype (str) – the Martini type
Return type:bool
Returns:True if a Martini antifreeze type
schrodinger.application.matsci.coarsegrain.get_martini_antifreeze_type_from_type(atype)

Return the Martini antifreeze type from the type.

Parameters:atype (str) – the Martini type
Return type:str
Returns:the Martini antifreeze type
schrodinger.application.matsci.coarsegrain.get_martini_type_from_super_type(atype)

Return the Martini type from the super type, i.e. ring or antifreeze type.

Parameters:atype (str) – the Martini super type
Return type:str
Returns:the Martini type
class schrodinger.application.matsci.coarsegrain.InternalInfo(names, indices, data)

Bases: tuple

__add__

Return self+value.

__class__

alias of builtins.type

__contains__

Return key in self.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__getitem__

Return self[key].

__getnewargs__()

Return self as a plain tuple. Used by copy and pickle.

__gt__

Return self>value.

__hash__

Return hash(self).

__init__

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__iter__

Implement iter(self).

__le__

Return self<=value.

__len__

Return len(self).

__lt__

Return self<value.

__module__ = 'schrodinger.application.matsci.coarsegrain'
__mul__

Return self*value.n

__ne__

Return self!=value.

static __new__(_cls, names, indices, data)

Create new instance of InternalInfo(names, indices, data)

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return a nicely formatted representation string

__rmul__

Return self*value.

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__slots__ = ()
__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

count(value) → integer -- return number of occurrences of value
data

Alias for field number 2

index(value[, start[, stop]]) → integer -- return first index of value.

Raises ValueError if the value is not present.

indices

Alias for field number 1

names

Alias for field number 0

schrodinger.application.matsci.coarsegrain.split_shadow_bond_tag(name)

Split the shadow bond tag from the given name.

Parameters:name (str) – the particle name
Return type:str, str
Returns:the given name less the shadow bond tag, the shadow bond tag (empty string if not present)
schrodinger.application.matsci.coarsegrain.get_martini_subtypes(type_tuple, martini_subtypes)

Return a list of Martini subtypes from the given type tuple.

Parameters:
  • type_tuple (tuple) – a type tuple, for example bond type tuple, containing particle names
  • martini_subtypes (dict) – keys are site type tuples and values are Martini subtypes
Return type:

list

Returns:

contains Martini subtypes

schrodinger.application.matsci.coarsegrain.get_martini_eq_length(pair_type, martini_subtypes)

Return the Martini equilibrium length parameter.

Parameters:
  • pair_type (tuple) – the bond pair type
  • martini_subtypes (dict) – keys are site type tuples and values are Martini subtypes
Return type:

float

Returns:

the equilibrium length parameter in Angstrom

schrodinger.application.matsci.coarsegrain.get_martini_bond_force_constant(pair_type, martini_subtypes)

Return the Martini bond force constant parameter.

Parameters:
  • pair_type (tuple) – the bond pair type
  • martini_subtypes (dict) – keys are site type tuples and values are Martini subtypes
Return type:

float

Returns:

the bond force constant parameter in (kcal/mol)/Ang.^2

schrodinger.application.matsci.coarsegrain.get_martini_epsilon(pair_type, martini_subtypes)

Return the Martini epsilon parameter.

Parameters:
  • pair_type (tuple) – the nonbond pair type
  • martini_subtypes (dict) – keys are site type tuples and values are Martini subtypes
Return type:

float

Returns:

the epsilon parameter in kcal/mol

schrodinger.application.matsci.coarsegrain.get_martini_sigma(pair_type, martini_subtypes)

Return the Martini sigma parameter.

Parameters:
  • pair_type (tuple) – the nonbond pair type
  • martini_subtypes (dict) – keys are site type tuples and values are Martini subtypes
Return type:

float

Returns:

the sigma parameter in Ang.

schrodinger.application.matsci.coarsegrain.get_combined_exclusion_str(bad_str, exclude_rings=False)

Return a combined exclusion string.

Parameters:
  • bad_str (str) – a bond, angle, or dihedral string, i.e. one of EXCLUDE_BONDS, EXCLUDE_BONDS_ANGLES, or EXCLUDE_BONDS_ANGLES_DIHEDRALS
  • exclude_rings (bool) – whether pairs in rings and fused-ring systems are also excluded
Return type:

str

Returns:

the combined exclusion string

schrodinger.application.matsci.coarsegrain.parse_combined_exclusion_str(combined_str)

Parse a combined exclusion string.

Parameters:combined_str (str) – a combined exclusion string obtained from get_combined_exclusion_str
Return type:str, bool
Returns:a bond, angle, or dihedral string, i.e. one of EXCLUDE_BONDS, EXCLUDE_BONDS_ANGLES, or EXCLUDE_BONDS_ANGLES_DIHEDRALS, and whether pairs in rings and fused-ring systems are also excluded
schrodinger.application.matsci.coarsegrain.get_type_dict_from_st(st, type_dict=None)

Return a sorted type dict for the given structure.

Parameters:
  • st (schrodinger.structure.Structure) – the structure from which to obtain the type dict
  • type_dict (OrderedDict or None) – specify a type dict to include in the returned type dict (note that this type dict takes precedence over the type dict data for the given structure) or None if there isn’t one
Return type:

OrderedDict

Returns:

the sorted type dict, keys are particle names, values are ParticleInfo

schrodinger.application.matsci.coarsegrain.system_has_charged_particles(model)

Check if any particle in the given system has a charge based on the sites FFIO block

Parameters:model (schrodinger.application.desmond.cms.Cms or schrodinger.application.desmond.ffiostructure.FFIOStructure) – The system to check the FFIO site block for charges
Return type:bool
Returns:True if an FFIO sites block exists in the given system and contains at least one charged particle. False if there is either no such block or the block contains only neutral particles
schrodinger.application.matsci.coarsegrain.get_cg_cutoff_data(model)

Return the coarse grain cutoff data, i.e. cutoff, margin, and r_clone.

Parameters:model (schrodinger.application.desmond.cms.Cms) – The model structure
Raises:ValueError – if model is incorrect
Return type:dict
Returns:the coarse grain cutoff, far type, margin, and r_clone values. Each key in the dictionary is a format specifier from the MSJ_*_COARSE_GRAIN_HEADER string and the value is the value for that format specifier
schrodinger.application.matsci.coarsegrain.compute_max_internal_distance(struct)

Compute the largest distance between any pair of atoms that are a) bonded, b) 1-3 in an angle or c) 1-4 in a dihedral

Parameters:struct (schrodinger.structure.Structure) – The structure to compute the distance over
Return type:float
Returns:The largest distance between any pair of atoms involved in a bond, angle or torsion
schrodinger.application.matsci.coarsegrain.get_coarse_grain_msj_header(struct)

Get the appropriate MSJ header text for this coarse grain structure

Parameters:struct (schrodinger.application.desmond.cms.Cms) – The structure to get the header for
Return type:str
Returns:The header text appropriate for this structure. An empty string is returned if the structure is not coarse-grained. The LJ header is used for coarse-grained systems with unrecognized non-bond potential type.
schrodinger.application.matsci.coarsegrain.get_coarse_grain_msj_family_header(struct)

Get any additional header text that needs to be inserted into the task stage of the msj file if this structure is coarse grain. This header can then be inserted when creating the .msj file by using the extra_task_text keyword to the desmondutils.create_msj call. i.e. header = coarsegrain.get_coarse_grain_msj_family_header(system) desmondutils.create_msj(stages, extra_task_text=header)

Parameters:struct (schrodinger.application.desmond.cms.Cms) – The structure to get the header for
Return type:str
Returns:The header text, if any, required for the current input. If no additional header text is required, an empty string is returned.
schrodinger.application.matsci.coarsegrain.validate_no_cg(struct=None, structs=None, rows=None)

Fail a validation check if any of the structures is a coarse grain structure

One and only one of struct, structs or rows should be given

Parameters:
Return type:

(False, msg) or True

Returns:

False and error message if the structure is coarse grain, True if everything is OK. Return value is acceptable for an AF2 valiator.

schrodinger.application.matsci.coarsegrain.is_coarse_grain(struct, by_atom=False)

Check if struct is a coarse grain structure

Parameters:
  • struct (schrodinger.structure.Structure) – The structure to check
  • by_atom (bool) – If True, check each atom to see if it is coarse grain and return True if any atom is coarse grin. If False, check only for the coarse grain structure property. True is useful when the structure has been obtained via maestro.workspace_get, which removes structure-level properties, or if the structure may be a mixed atomistic/coarse-grained structure.
Return type:

bool

Returns:

True if it is a coarse grain structure, False if not

schrodinger.application.matsci.coarsegrain.set_as_coarse_grain(struct)

Mark struct as a coarse grain structure

Parameters:struct (schrodinger.structure.Structure) – The structure to mark
schrodinger.application.matsci.coarsegrain.set_nonbond_potential_type(struct, nbtype)

Mark the structure with the non-bond pontential type

Parameters:
Raises:
  • ValueError – if nbtype is not in NONBOND_POTENTIALS
  • TypeError – if struct is not a coarse grain system
schrodinger.application.matsci.coarsegrain.set_angle_potential_type(struct, atype)

Mark the structure with the angle pontential type

Parameters:
Raises:
  • ValueError – if atype is not in ANGLES_KEYS
  • TypeError – if struct is not a coarse grain system
schrodinger.application.matsci.coarsegrain.get_nonbond_potential_type(struct)

Return the type of non-bond potential for this structure

Parameters:struct (schrodinger.structure.Structure) – The structure to check
Return type:str or None
Returns:The value of the NB_TYPE_KEY property on the structure, or None if the structure is not a coarse grain structure or does not have this property set
schrodinger.application.matsci.coarsegrain.get_angle_potential_type(struct)

Return the type of angle potential for this structure

Parameters:struct (schrodinger.structure.Structure) – The structure to check
Return type:str or None
Returns:The value of the ANGLE_TYPE_KEY property on the structure, or None if the structure is not a coarse grain structure or does not have this property set
schrodinger.application.matsci.coarsegrain.is_lennard_jones(struct)

Check if this is a Lennard-Jones coarse grain structure

Parameters:struct (schrodinger.structure.Structure) – The structure to check
Return type:bool
Returns:True if this is a coarse grain Lennard-Jones structure, False if not
schrodinger.application.matsci.coarsegrain.is_repulsive_harmonic(struct)

Check if this is a repulsive harmonic coarse grain structure

Parameters:struct (schrodinger.structure.Structure) – The structure to check
Return type:bool
Returns:True if this is a coarse grain repulsive harmoic structure, False if not
schrodinger.application.matsci.coarsegrain.is_shifted_lennard_jones(struct)

Check if this is a shifted Lennard-Jones coarse grain structure

Parameters:struct (schrodinger.structure.Structure) – The structure to check
Return type:bool
Returns:True if this is a coarse grain shifted Lennard-Jones structure, False if not
schrodinger.application.matsci.coarsegrain.is_harmonic_angle(struct)

Check if this is a harmonic angle coarse grain structure

Parameters:struct (schrodinger.structure.Structure) – The structure to check
Return type:bool
Returns:True if this is a coarse grain harmonic angle structure, False if not
schrodinger.application.matsci.coarsegrain.is_trigonometric_angle(struct)

Check if this is a trigonometric angle coarse grain structure

Parameters:struct (schrodinger.structure.Structure) – The structure to check
Return type:bool
Returns:True if this is a coarse grain trigonometric angle structure, False if not
schrodinger.application.matsci.coarsegrain.set_atom_coarse_grain_properties(struct, atom, name, rgb=(100, 100, 100), atom_type=400, formal_charge=0.0, partial_charge=0.0, radius=3.0, mass=12.0)

Set the properties required for a coarse grain particle atom

Parameters:
  • structure (schrodinger.structure.Structure) – The structure containing the atom
  • atom (schrodinger.structure._StructureAtom) – The atom to set properties on
  • name (str) – The name of the coarse grain particle.
  • rgb (tuple) – The 0-255 tuple of red, green and blue that defines the atom color
  • atom_type (int) – The mmod atom type
  • formal_charge (int) – The formal charge
  • partial_charge (float) – The partial charge
  • radius (float) – The particle radius, in Angstrom
  • mass (float) – The particle mass
schrodinger.application.matsci.coarsegrain.get_cg_molecule_hash(mol)

Return a hash for the given CG molecule.

Parameters:mol (schrodinger.structure._Molecule) – the molecule
Raises:ValueError – if there is a problem
Return type:str
Returns:the hash
schrodinger.application.matsci.coarsegrain.collect_unique_structures(st, hash_getter=None)

Using the given structure and hasher collect unique instances of molecule structures as the keys of a dictionary with their values being lists of tuples of atom indices for all molecule instances.

Parameters:
  • st (schrodinger.structure.Structure) – the structure containing the molecules
  • hash_getter (function) – the function used to obtain a unique hash for a given molecule, takes schrodinger.structure._Molecule, should return None if a hash can not be created
Return type:

dict

Returns:

keys are schrodinger.structure.Structure, values are lists of atom index tuples

schrodinger.application.matsci.coarsegrain.get_internal_info(atoms, data_getter=None, uniqueify=False)

Return information about the given internal.

Parameters:
  • atoms (list) – contains schrodinger.structure._StructureAtom that define the internal
  • data_getter (function or None) – if given used to obtain data for the given internal, takes a list of schrodinger.struture._StructureAtom and returns a data tuple
  • uniqueify (bool) – if True then relevant internal coordinates will be uniqueified by type
Return type:

InternalInfo

Returns:

the internal info

schrodinger.application.matsci.coarsegrain.internals_iterator(sts_idxs_dict, idx_getter, data_getter=None, uniqueify=False)

Iterator that yields InternalInfo for each internal in the system defined by the given dictionary of unique molecular structures and atom indices of all molecule instances. Internal indices and data are obtained with the given getters.

Parameters:
  • sts_idxs_dict (dict) – keys are schrodinger.structure.Structure, values are lists of atom index tuples, together they define the system
  • idx_getter (function) – gets indices of internals, takes a schrodinger.structure.Structure as kwarg ‘struct’ and yields index tuples
  • data_getter (function or None) – gets data of internals, takes a list of schrodinger.struture._StructureAtom and returns a data tuple
  • uniqueify (bool) – if True then relevant internal coordinates will be uniqueified by type
Return type:

InternalInfo

Returns:

each iteration yields an InternalInfo

schrodinger.application.matsci.coarsegrain.order_internal_by_name(atoms)

Order the atoms of the given internal coordinate by name.

Parameters:atoms (list) – contains structure._StructureAtom of the internal coordinate to be ordered
Return type:list
Returns:atoms sorted by name
schrodinger.application.matsci.coarsegrain.get_names(atoms, uniqueify=False)

Return the atom names for the given list of atoms.

Parameters:
  • atoms (list) – contains structure._StructureAtom
  • uniqueify (bool) – if True then relevant internal coordinates will be uniqueified by type
Return type:

tuple

Returns:

contains atom names

schrodinger.application.matsci.coarsegrain.site_iterator(struct=None)

Create a site iterator from the given structure.

Parameters:struct (schrodinger.structure.Structure) – the structure
Return type:tuple
Returns:each iteration yields a tuple containing a single index
schrodinger.application.matsci.coarsegrain.fused_ring_nonbond_iterator(struct=None)

Create a fused ring nonbond iterator from the given structure.

Parameters:struct (schrodinger.structure.Structure) – the structure
Return type:tuple
Returns:each iteration yields a nonbond index pair tuple
class schrodinger.application.matsci.coarsegrain.Internals(astructure, uniqueify=False)

Bases: object

Manage the internal coordinates of a structure.

__init__(astructure, uniqueify=False)

Create an instance.

Parameters:
  • astructure (structure.Structure) – the structure for which the internal coordinates are needed
  • uniqueify (bool) – if True then relevant internal coordinates will be uniqueified by type
avgInternals(internals)

Average the values of the internals in the given dictionary of internals.

Parameters:internals (dict) – keys are tuples of names of the constitutive atoms, values is a list of pair tuples containing (1) a tuple of atom indices and (2) a tuple of internal values
Return type:dict
Returns:keys are tuples of names of the constitutive atoms, values are pair tuples containing (1) tuple of tuples containing atom indices for all of the internals with the given key and (2) a tuple of average internal values
recursivelySort(internals)

Return the given dictionary of internal coordinates recursively sorted by the names of the constitutive atoms.

Parameters:internals (dict) – keys are tuples of names of the constitutive atoms, values are pair tuples containing (1) tuple of tuples containing atom indices for all of the internals with the given key and (2) a tuple of average internal values
Return type:OrderedDict
Returns:internals recursively sorted
setInternals(internals, info, internals_excluded=None)

Set internals.

Parameters:
  • internals (dict) – keys are tuples of names of the constitutive atoms, values is a list of pair tuples containing (1) a tuple of atom indices and (2) a tuple of internal values
  • info (InternalInfo) – information for this internal
  • internals_excluded (dict or None) – contains internals that should be excluded from being set. keys are tuples of names of the constitutive atoms, values is a list of pair tuples containing (1) a tuple of atom indices and (2) a tuple of internal values or None if there isn’t one
Return type:

bool

Returns:

True if the internal was set, or False if it was not set due to already appearing in the internals_excluded dict

averageAndSort(internals)

Average and sort the given internals.

Parameters:internals (dict) – keys are tuples of names of the constitutive atoms, values is a list of pair tuples containing (1) a tuple of atom indices and (2) a tuple of internal values
Return type:dict
Returns:sorted keys where keys are tuples of names of the constitutive atoms, values are pair tuples containing (1) tuple of tuples containing atom indices for all of the internals with the given key and (2) a tuple of average internal values
setSites()

Set the sites dictionary.

setBonds()

Set the bonds dictionary.

setAngles()

Set angles dictionary.

setDihedrals()

Set dihedrals dictionary.

setImpropers()

Set impropers dictionary.

getNewAngles(new_bonds)

Return the new angles.

Parameters:new_bonds (list) – contains schrodinger.structure._StructureAtom pair tuples for new bonds
Return type:list
Returns:contains schrodinger.structure._StructureAtom triples tuples for new angles
getNewDihedrals(new_bonds)

Return the new dihedrals.

Parameters:new_bonds (list) – contains schrodinger.structure._StructureAtom pair tuples for new bonds
Return type:list
Returns:contains schrodinger.structure._StructureAtom quadruples tuples for new dihedrals
getNewImpropers(new_bonds)

Return the new impropers.

Parameters:new_bonds (list) – contains schrodinger.structure._StructureAtom pair tuples for new bonds
Return type:list
Returns:contains schrodinger.structure._StructureAtom quadruples tuples for new impropers
removeInternalsWithNewBonds()

Remove internals with new bonds.

findNewBonds(name_1, name_2, bonds_deep, exclude_what='Bonds')

Return the new bond pairs.

Parameters:
  • name_1 (str) – the name of the first particle
  • name_2 (str) – the name of the second particle
  • bonds_deep (int) – the number of bonds separating the particles
  • exclude_what (str) – What nonbonds to exclude when regenerating the lists of included and excluded nonbonds after adding these bonds - should be one of the EXCLUDE_* constants, potentially combined for rings with get_combined_exclusion_str
Return type:

list

Returns:

contains schrodinger.structure._StructureAtom pair tuples for new bonds

updateFusedRingIdxsForNewBonds(new_bonds_tuples)

Update the fused ring idxs when a new set of bonds has been defined.

Parameters:new_bonds_tuples (list) – contains schrodinger.structure._StructureAtom pair tuples for new bonds
updateInternalsForNewBonds(new_bonds_tuples, exclude_what='Bonds')

Update the internals when a new set of bonds has been defined

Parameters:
  • new_bonds_tuples (list) – contains schrodinger.structure._StructureAtom pair tuples for new bonds
  • exclude_what (str) – What nonbonds to exclude when regenerating the lists of included and excluded nonbonds after adding these bonds - should be one of the EXCLUDE_* constants, potentially combined for rings with get_combined_exclusion_str
setNonBonds(exclude_newbonds=True)

Set nonbonds dictionary.

Parameters:exclude_newbonds (bool) – If True, exclude new bonds added by the user. If False, only exclude pairs that are actually bonded.
setBasic(exclude_what='Bonds')

Set basic dictionaries.

Parameters:exclude_what (str) – What nonbonds to exclude - should be one of the EXCLUDE_* constants, potentially combined for rings with get_combined_exclusion_str
setFusedRingNonBonds(sts_idxs_dict=None)

Set fused ring nonbonds dictionary.

Parameters:sts_idxs_dict (dict) – keys are schrodinger.structure.Structure, values are lists of atom index tuples, together they define the system
handleRingExclusions()

Handle ring exclusions.

setIncludedExcludedNonBonds(exclude_what='Bonds')

Define which non-bond interactions are included and excluded

Parameters:exclude_what (str) – What to exclude - should be one of the EXCLUDE_* constants, potentially combined for rings with get_combined_exclusion_str
setAngleNonBonds()

Set angle nonbonds dictionary.

setNonAngleNonBonds()

Set the nonangle nonbonds dictionary.

setDihedralNonBonds()

Set dihedral nonbonds dictionary.

setNonAngleNonDihedralNonBonds()

Set the nonangle nondihedral nonbonds dictionary.

setBondNonBonds()

Set the bond nonbonds dictionary.

setAllPairs()

Set the all pairs dictionary.

mergeNonbonds(nonbonds, new_nonbonds)

Return a copy of the first nonbonds dict merged with the second.

Parameters:
  • nonbonds (dict) – keys are tuples of names of the constitutive atoms, values is a list of pair tuples containing (1) a tuple of atom indices and (2) a tuple of internal values or None if there isn’t one
  • new_nonbonds (dict) – keys are tuples of names of the constitutive atoms, values is a list of pair tuples containing (1) a tuple of atom indices and (2) a tuple of internal values or None if there isn’t one
Return type:

dict

Returns:

merged nonbonds

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.matsci.coarsegrain', '__doc__': '\n Manage the internal coordinates of a structure.\n ', '__init__': <function Internals.__init__>, 'avgInternals': <function Internals.avgInternals>, 'recursivelySort': <function Internals.recursivelySort>, 'setInternals': <function Internals.setInternals>, 'averageAndSort': <function Internals.averageAndSort>, 'setSites': <function Internals.setSites>, 'setBonds': <function Internals.setBonds>, 'setAngles': <function Internals.setAngles>, 'setDihedrals': <function Internals.setDihedrals>, 'setImpropers': <function Internals.setImpropers>, 'getNewAngles': <function Internals.getNewAngles>, 'getNewDihedrals': <function Internals.getNewDihedrals>, 'getNewImpropers': <function Internals.getNewImpropers>, 'removeInternalsWithNewBonds': <function Internals.removeInternalsWithNewBonds>, '_removeUniqueParticleLabels': <function Internals._removeUniqueParticleLabels>, 'findNewBonds': <function Internals.findNewBonds>, 'updateFusedRingIdxsForNewBonds': <function Internals.updateFusedRingIdxsForNewBonds>, '_getNewNonbonds': <function Internals._getNewNonbonds>, 'updateInternalsForNewBonds': <function Internals.updateInternalsForNewBonds>, '_findNonBondPairs': <function Internals._findNonBondPairs>, 'setNonBonds': <function Internals.setNonBonds>, 'setBasic': <function Internals.setBasic>, 'setFusedRingNonBonds': <function Internals.setFusedRingNonBonds>, 'handleRingExclusions': <function Internals.handleRingExclusions>, 'setIncludedExcludedNonBonds': <function Internals.setIncludedExcludedNonBonds>, 'setAngleNonBonds': <function Internals.setAngleNonBonds>, 'setNonAngleNonBonds': <function Internals.setNonAngleNonBonds>, 'setDihedralNonBonds': <function Internals.setDihedralNonBonds>, 'setNonAngleNonDihedralNonBonds': <function Internals.setNonAngleNonDihedralNonBonds>, 'setBondNonBonds': <function Internals.setBondNonBonds>, 'setAllPairs': <function Internals.setAllPairs>, 'mergeNonbonds': <function Internals.mergeNonbonds>, '__dict__': <attribute '__dict__' of 'Internals' objects>, '__weakref__': <attribute '__weakref__' of 'Internals' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.matsci.coarsegrain'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

class schrodinger.application.matsci.coarsegrain.FusedRing(rings)

Bases: object

Manage a fused ring.

__init__(rings)

Create an instance.

Parameters:rings (list) – contains schrodinger.structure._Ring
getAtomIndices()

Return a list of atom indices.

Return type:list
Returns:atom indices
static getFusedRings(st)

Return a list of fused ring objects for the given structure.

Parameters:st (structure.Structure) – the structure
Return type:list
Returns:contains FusedRing
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.matsci.coarsegrain', '__doc__': '\n Manage a fused ring.\n ', '__init__': <function FusedRing.__init__>, '_getEdges': <function FusedRing._getEdges>, 'getAtomIndices': <function FusedRing.getAtomIndices>, '_getIdxsRingsDict': <staticmethod object>, 'getFusedRings': <staticmethod object>, '__dict__': <attribute '__dict__' of 'FusedRing' objects>, '__weakref__': <attribute '__weakref__' of 'FusedRing' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.matsci.coarsegrain'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

schrodinger.application.matsci.coarsegrain.setCGBondLengths(st)

Set the bond lengths of the given CG structure according to the particle radii.

Parameters:st (structure.Structure) – the CG structure
Return type:structure.Structure
Returns:the CG structure with the new bond lengths
schrodinger.application.matsci.coarsegrain.fix_linear_angles(struct, internals=None, angles=None)

Return a copy of the given structure with linear angles fixed.

Parameters:
  • struct (structure.Structure) – the structure whose angles will be fixed
  • internals (Internals or None) – the internals of the structure, if None it will be defined
  • angles (list or None) – contains tuples of atom names of the angles to be fixed, if None then all will be fixed
Return type:

structure.Structure

Returns:

the structure with angles fixed