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

__contains__(key, /)

Return key in self.

__len__()

Return len(self).

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

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

exception schrodinger.application.matsci.coarsegrain.MixedAACGStructuresError

Bases: ValueError

Exception when input has a mix of CG and AA structures.

__init__(*args, **kwargs)
args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

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

Return a base64 string from the given structure.

Parameters

st (schrodinger.structure.Structure) – the structure

Return type

str

Returns

the base64 string

schrodinger.application.matsci.coarsegrain.get_structure_from_base64_str(base64_str)

Return a structure from the given base64 string.

Parameters

astr (str) – the base64 string

Return type

schrodinger.structure.Structure

Returns

the structure

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.is_martini_tiny_type(atype)

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

Parameters

atype (str) – the Martini type

Return type

bool

Returns

True if a Martini tiny type

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

Return the Martini tiny type from the type.

Parameters

atype (str) – the Martini type

Return type

str

Returns

the Martini tiny 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

schrodinger.application.matsci.coarsegrain.get_bead_count(struct, excluded_atom_ids=None)

Gets a dictionary containing the counts of the different “beads” in the coarse-grained structure.

Parameters
  • struct (schrodinger.structure.Structure) – the structure to get formula from

  • excluded_atom_ids (None or a list of atom ids) – exclude these atoms when computing the formula

Return type

dict

Returns

A dictionary whose keys are the “bead”/atom names and whose values are the number of beads/atoms

schrodinger.application.matsci.coarsegrain.get_atom_name_formula(struct, excluded_atom_ids=None)

Return a ‘molecular formula’ based on atom names (e.g., (BENZ)(W)20)

Parameters
  • struct (schrodinger.structure.Structure) – the structure to get formula from

  • excluded_atom_ids (None or a list of atom ids) – exclude these atoms when computing the formula

Return type

str

Returns

‘molecular formula’ based on atom names

class schrodinger.application.matsci.coarsegrain.InternalInfo(names, indices, data)

Bases: tuple

__contains__(key, /)

Return key in self.

__len__()

Return len(self).

count(value, /)

Return number of occurrences of value.

data

Alias for field number 2

index(value, start=0, stop=9223372036854775807, /)

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.

Parameters

model (schrodinger.application.desmond.cms.Cms) – The model structure

Raises

ValueError – if model is incorrect

Return type

dict

Returns

the coarse grain cutoff data, 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 desconfig.create_msj call. i.e. header = coarsegrain.get_coarse_grain_msj_family_header(system) desconfig.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
  • struct (schrodinger.structure.Structure) – The structure, if only a single structure is to be tested

  • structs (list) – A list of structures to test

  • rows (iterator of schrodinger.project.ProjectRow) – Project Table rows to check

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.set_as_coarse_grain(struct)

Mark struct as a coarse grain structure

Parameters

struct (schrodinger.structure.Structure) – The structure to mark

Raises

LicenseError – If the license is not valid for using coarse grained structures

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.is_martini_useries(model)

Check if the model is a Martini model with Useries

Parameters

model (cms.Cms) – The cms model to check

Return type

bool

Returns

True if this is a coarse grain model uses Martini model with Useries, 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

Raises

LicenseError – If the license is not valid for using coarse grained structures

schrodinger.application.matsci.coarsegrain.get_cg_molecule_hash(mol)

Return a hash for the given CG molecule.

Parameters

mol (schrodinger.structure._Molecule) – the molecule

Return type

str

Returns

the hash

schrodinger.application.matsci.coarsegrain.create_cg_molecule_name(mol)

Create a name for the passed molecule by getting the count of each type of bead in it The format is “A:4, B:5, …” where A and B are bead names and 4 and 5 are the counts of each in the molecule

Parameters

mol (structure._Molecule) – The molecule to get the name for

Return type

str

Returns

The molecule name

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

set

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 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

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

schrodinger.application.matsci.coarsegrain.is_coarse_grain_input(input_file=None, input_sts=None)

Return True if the given structures are exclusively coarse-grained, False if exclusively atomistic, and raise a ValueError otherwise.

Parameters
  • input_file (str) – the input file

  • input_sts (list) – contains structure.Structure

Raises

ValueError – no input or a both coarse-grained and atomistic

Return type

bool

Returns

True if exclusively coarse-grained, False if exclusively atomistic

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

Return a list of unique bonds for the given coarse grain structure.

Parameters

st (schrodinger.structure.Structure) – the coarse grain structure

Return type

list[schrodinger.structure._StructureBond]

Returns

unique bonds

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

Return the mass of the given coarse grain structure.

Parameters

st (schrodinger.structure.Structure) – the coarse grain structure

Return type

float

Returns

the mass in g/mol