schrodinger.application.desmond.fep_struc module¶
Defines a `Struc’ class as a generic represention of molecular structure
-
class
schrodinger.application.desmond.fep_struc.Struc¶ Bases:
object-
__init__()¶ Initialize self. See help(type(self)) for accurate signature.
-
__str__()¶ Return str(self).
-
id()¶ Returns the ID of this structure.
-
set_id(id)¶ Sets the ID for this structure.
-
copy()¶
-
extract(indices)¶ Return a new structure object which contains the atoms of the current structure that appear in the specified list.
-
title()¶
-
set_title(new_title)¶
-
heavy_atoms()¶ Returns a list of indices of heavy atoms (viz non-hydrogen atoms).
-
is_chiral_atom(atom_index)¶ Returns true if the atom indicated by
atom_indexis chiral; otherwise, false.Parameters: atom_index ( int) – Atom index
-
chiral_atoms()¶ Returns the indices of the chiral atoms.
Return type: listofintReturns: A list of atom indices
-
ring_atoms()¶ Returns a set of ring atoms.
Return type: setofintReturns: A set of atom indices
-
bonded_atoms(atom_index)¶ Returns a list of atom indices of atoms bonded to the indicated atom.
Parameters: atom_index ( int) – A single index or a list of indices of the atoms to be deletedReturn type: listofintReturns: A list of atom indices of atoms bonded to the indicated atom
-
total_charge()¶ Returns the total charge of the structure.
-
delete_atom(atom_index)¶ Deletes a atom.
Parameters: atom_index ( intorlistofint) – A single index or a list of indices of the atoms to be deleted
-
smarts()¶ Returns a SMARTS string of this structure.
-
smiles()¶ Returns a SMILES string of this structure.
-
write(format, mode='a')¶ Writes this structure into a file in the designated format.
Parameters: mode ( char, ‘a’ | ‘w’) – When a file of the same name exists, this determines whether to overwrite (‘w’) or append (‘a’) to the file.
-
__class__¶ alias of
builtins.type
-
__delattr__¶ Implement delattr(self, name).
-
__dict__= mappingproxy({'__module__': 'schrodinger.application.desmond.fep_struc', '__doc__': '\n\n ', '__init__': <function Struc.__init__>, '__str__': <function Struc.__str__>, '_atom': <function Struc._atom>, 'id': <function Struc.id>, 'set_id': <function Struc.set_id>, 'copy': <function Struc.copy>, 'extract': <function Struc.extract>, 'title': <function Struc.title>, 'set_title': <function Struc.set_title>, 'heavy_atoms': <function Struc.heavy_atoms>, 'is_chiral_atom': <function Struc.is_chiral_atom>, 'chiral_atoms': <function Struc.chiral_atoms>, 'ring_atoms': <function Struc.ring_atoms>, 'bonded_atoms': <function Struc.bonded_atoms>, 'total_charge': <function Struc.total_charge>, 'delete_atom': <function Struc.delete_atom>, 'smarts': <function Struc.smarts>, 'smiles': <function Struc.smiles>, 'write': <function Struc.write>, '__dict__': <attribute '__dict__' of 'Struc' objects>, '__weakref__': <attribute '__weakref__' of 'Struc' 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.desmond.fep_struc'¶
-
__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
-
__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.desmond.fep_struc.SchrodStruc(struc)¶ Bases:
schrodinger.application.desmond.fep_struc.StrucA `Struc’ subclass based on Schrodinger’s infrastructure
-
__setstate__(dict)¶
-
copy()¶ Returns a copy of this structure.
-
extract(indices)¶ Return a new structure object which contains the atoms of the current structure that appear in the specified list.
-
title()¶ Returns the title of this structure. (Normally title’s a user-friendly description)
-
set_title(new_title)¶ Sets a new title to this structure.
-
heavy_atoms()¶ Returns a list of indices of heavy atoms (viz non-hydrogen atoms).
-
is_chiral_atom(atom_index)¶ Returns true if the atom indicated by
atom_indexis chiral; otherwise, false.Parameters: atom_index ( int) – Atom index
-
chiral_atoms()¶ Returns the indices of the chiral atoms.
Return type: listofintReturns: A list of atom indices
-
ring_atoms(aromaticity=0, group=False)¶ Returns ring atoms.
Parameters: - aromaticity (
int-1, 0, 1) – -1 = non-aromatic, 0 = all, 1 = aromatic. Make the function return the specified type of ring atoms. - group (
bool) – If true, returns a list ofsetobjects, each of which is a set of indices of atoms in the same ring; otherwise, returns a single set containing indices of all selected ring atoms.
:rtype :
setofintor alistofsetofint:return : A set or a list of sets of atom indices- aromaticity (
-
bonded_atoms(atom_index)¶ Returns a list of atom indices of atoms bonded to the indicated atom.
Parameters: atom_index ( int) – A single index or a list of indices of the atoms to be deletedReturn type: listofintReturns: A list of atom indices of atoms bonded to the indicated atom
-
molecules()¶ Returns a list of atom lists. Each element list is a list of atoms of a molecule in the structure. The first element in the returned list belongs to the biggest molecule.
-
total_charge()¶ Returns the formal charge of the structure
-
add_hydrogens()¶ Adds hydrogen atoms to this molecule.
-
delete_atom(atom_index)¶ Deletes a atom.
Parameters: atom_index ( intorlistofint) – A single index or a list of indices of the atoms to be deleted
-
smarts(atoms=None)¶ Returns a SMARTS string for this structure.
Parameters: atoms ( listofint) – A list of atom indices
-
smiles()¶ Returns a SMILES string for this structure.
-
write(filename, format=None, mode='a', cil=False)¶ Writes this structure into a file in the designated format.
Parameters: format ( strorNone) – If its value isNone, the file format is determined from the filename suffix. If specified, it must be one of the following case-sensitive strings: “pdb”, “mol2”, “sd”, “maestro”, “smiles”, and “smilescsv”.
-
__class__¶ alias of
builtins.type
-
__delattr__¶ Implement delattr(self, name).
-
__dict__= mappingproxy({'__module__': 'schrodinger.application.desmond.fep_struc', '__doc__': "\n A `Struc' subclass based on Schrodinger's infrastructure\n ", '__init__': <function SchrodStruc.__init__>, '__setstate__': <function SchrodStruc.__setstate__>, 'copy': <function SchrodStruc.copy>, 'extract': <function SchrodStruc.extract>, 'title': <function SchrodStruc.title>, 'set_title': <function SchrodStruc.set_title>, 'heavy_atoms': <function SchrodStruc.heavy_atoms>, 'is_chiral_atom': <function SchrodStruc.is_chiral_atom>, 'chiral_atoms': <function SchrodStruc.chiral_atoms>, 'ring_atoms': <function SchrodStruc.ring_atoms>, 'bonded_atoms': <function SchrodStruc.bonded_atoms>, 'molecules': <function SchrodStruc.molecules>, 'total_charge': <function SchrodStruc.total_charge>, 'add_hydrogens': <function SchrodStruc.add_hydrogens>, 'delete_atom': <function SchrodStruc.delete_atom>, 'smarts': <function SchrodStruc.smarts>, 'smiles': <function SchrodStruc.smiles>, 'write': <function SchrodStruc.write>})¶
-
__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.desmond.fep_struc'¶
-
__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)
-
id()¶ Returns the ID of this structure.
-
set_id(id)¶ Sets the ID for this structure.
-