schrodinger.application.desmond.struc module¶
A collection of miscellaneous molecular-structure-related functions.
Copyright Schrodinger, LLC. All rights reserved.
-
schrodinger.application.desmond.struc.
get_sidechain_att_atom
(residue: schrodinger.structure.structure._Residue) → Optional[Tuple[schrodinger.structure.structure._StructureAtom, schrodinger.structure.structure._StructureAtom]]¶ Given an amino acid residue
residue
, this function returns two atoms: The first atom is the alpha carbon, and the 2nd is the beta atom belonging to the sidechain and is bonded to the first atom.If no attachment atoms cannot be identified,
None
is returned.
-
schrodinger.application.desmond.struc.
get_residue_sitename
(residue: schrodinger.structure.structure._Residue)¶ Given a
_Residue
object (‘residue’), this function returns a string that represents the name of the residue site.The string is in the format C:RESXX[I] where C is the chain name, RES is the residue type name, XX is the residue number in the chain, and I is the insertion code. For example, a string could be “A:Tyr45[B]”.
If there is no insertion code, the string will be reduced to C:RESXX, e.g. “A:Tyr45”.
-
schrodinger.application.desmond.struc.
all_atoms
(structures)¶ Returns an iterator over all atoms in all given structures. The order of iteration is the following: The atoms of the first structure, the atoms of the second, and so on. If a
Cms' object is given, the order of iteration is the atoms of the full-system CT, those of an internal copy of the full-systemm CT within the `Cms
object [when writing theCms
object into a file (or string), it’s this copy that is outputted], the atoms of the first component CT, of the 2nd component CT, and so on.
-
schrodinger.application.desmond.struc.
selected_atoms
(st: schrodinger.structure.structure.Structure, atom_indices: Iterable[int] = None, asl: str = None) → Iterator[schrodinger.structure.structure._StructureAtom]¶ Returns an iterator over the atoms selected either by
atom_indices
orasl
. The order of the iteration is the same as that ofatom_indices
or the result ofanalyze.evaluate_asl
. It’s an error to provide bothatom_indices
andasl
arguments.
-
schrodinger.application.desmond.struc.
set_atom_properties
(atoms, propnames, values=None)¶ Set atom properties for the given atoms.
Parameters: - atoms (Iterable[_StructureAtom]) – Atoms whose properties will be set.
- propnames (List[str]) – A list of atom property names
- values – A list of atom property values. Each value is for the
corresponding property in
propnames
. If not given, the default value will be0
,False
, and""
for the numeric types, the boolean type, and the string type, respectively.
-
schrodinger.application.desmond.struc.
delete_structure_properties
(structures, propnames)¶ For a supplied list of structures and structure property keys, delete the property values associated with those keys from each structure if possible.
Parameters: - structures (Union[Structrue, Iterable[Structure]]) – a list of structure (or a single structure) from which to delete the specified properties
- propnames (Union[str, Iterable[str]]) – a list of structure property keys (or a single structure property keys) that should be deleted from the supplied structures
-
schrodinger.application.desmond.struc.
delete_atom_properties
(st, propnames)¶ Deletes atom properties for all atoms of the given structure(s).
-
schrodinger.application.desmond.struc.
rename_atom_property
(st, old_name, new_name)¶ Renames an atom property’s name from
old_name
tonew_name
for the given structure(s)st
.
-
schrodinger.application.desmond.struc.
read_all_ct
(fname)¶
-
schrodinger.application.desmond.struc.
read_all_structures
(fname: str) → List[schrodinger.structure.structure.Structure]¶ Read a *.mae file and return all CTs in a list.
-
schrodinger.application.desmond.struc.
set_atom_reference_coordinates
(atom: schrodinger.structure.structure._StructureAtom, coords: List[float])¶ Parameters: - atom – An atom whose properties will be updated to save the given reference coordinates
- coords – [x, y, z] coordinates for atom
-
schrodinger.application.desmond.struc.
get_atom_reference_coordinates
(atom: schrodinger.structure.structure._StructureAtom) → List[float]¶ Return the given atom’s reference coordinates that have been previously saved into the atom properties. If no reference coordinates was saved before, return the atom’s current coordinates.
-
schrodinger.application.desmond.struc.
set_ct_reference_coordinates
(ct: schrodinger.structure.structure.Structure)¶ Set reference coordinates for all atoms in
ct
using current coordinates.
-
schrodinger.application.desmond.struc.
get_reference_ct
(ct: schrodinger.structure.structure.Structure) → schrodinger.structure.structure.Structure¶ Returns a copy of the input structure. If the input structure contains previously saved reference coordinates, these coordinates are recovered in the return structure.
-
schrodinger.application.desmond.struc.
fixup_duplicate_properties
(cts: List[schrodinger.structure.structure.Structure]) → List[schrodinger.structure.structure.Structure]¶ Return a copy of the original structures. In the returned structures, properties that only differ by the type are deleted.
-
schrodinger.application.desmond.struc.
update_maestro_group
(model: Cms, title: str, jobname: str) → None¶ Inplace modify
model
-
schrodinger.application.desmond.struc.
get_res_ct_and_atom_idx
(res: schrodinger.structure.structure._Residue, cap=False) → Tuple[schrodinger.structure.structure.Structure, Dict[int, int]]¶ Given a
_Residue
object, extract the residue structure and a map of from the original atom index to the residue fragment atom index.Parameters: - res – Residue to extract
- cap – Set to True to add capping groups, default is False. These atoms are not included in the atom index.
-
schrodinger.application.desmond.struc.
align_cap
(ct0: schrodinger.structure.structure.Structure, ct1: schrodinger.structure.structure.Structure) → None¶ Given two capped peptides, set the coordinates for the cap groups in
ct1
to match those ofct0
.Parameters: - ct0 – The reference structure.
- ct1 – The structure to modify in place.
-
schrodinger.application.desmond.struc.
hash_title
(ct: schrodinger.structure.structure.Structure) → str¶ Hash a structure’s title string and return the hash. :param ct: Structure to get title from.
-
schrodinger.application.desmond.struc.
struc_iter
(*structures)¶ Iterates over all structures passed in as the arguments. Containers of
Structure
objects will be flatten out and iterated over. Non-Structure
objects will be skipped. For example:struc_iter(st0, st1, None, [st2, st3, [st4, None, 1, “2”, 3.0, st5]])The iteration sequence will be
st0, st1, st2, st3, st4, st5
.
-
schrodinger.application.desmond.struc.
struc_merge
(*structures)¶ Merges all given structures and returns a single
Structure
object. For example:struc_merge(st0, st1, None, [st2, st3, [st4, None, 1, “2”, 3.0, st5]])The returned object will be a merged structure containing
st0
,st1
,st2
,st3
,st4
, andst5
, in that order.
-
class
schrodinger.application.desmond.struc.
CompStruc
(*args)¶ Bases:
object
-
__init__
(*args)¶ Initialize self. See help(type(self)) for accurate signature.
-
__len__
()¶
-
alchemical_water
¶
-
cosolvent
¶
-
crystal_water
¶
-
fep_mut
¶
-
fep_ref
¶
-
ion
¶
-
ligand
¶
-
membrane
¶
-
negative_salt
¶
-
positive_salt
¶
-
receptor
¶
-
solute
¶
-
solvent
¶
-
-
schrodinger.application.desmond.struc.
component_structures
(model: Cms) → schrodinger.application.desmond.struc.CompStruc¶