Package schrodinger :: Package application :: Package combiglide :: Package packages :: Module core_classifier :: Class CoreClassifier
[hide private]
[frames] | no frames]

Class CoreClassifier

Partition to generate structural partitions for a structure containing a single ring system. Beyond the lowest partitionings, the classification only applies to the ring-system portion of the input structure.

Instance Methods [hide private]
 
__init__(self, st_orig, smiles_stereo=None, smiles_nostereo=None)
Create partitions for a single input structure.
String
getRep(self, partitioning)
Return the partition name (representation) of the structure at the specified partitioning.
List
getReps(self)
Return a list containing the partition names (representations) of the structure at all partitionings.
Dictionary
getFullReps(self)
Return dictionary of data associated with the representation at every partitioning.
 
_setIatomIsAromatic(self)
Create and store a list giving aromatic status (True or False) for each atom, indexed by atom number (index origin 1):
 
_setSelfStInfo(self, st=None)
Isolate ring structure in self.st into self.ring_st and set self data structures to values consistent with self.st and self.ring_st.
 
_setFullReps(self, partitioning, sm, rep, st)
Set results in the top-level data structure for the specified partitioning:
 
_genReps(self)
Generate the representations at all partitionings.
Bool
_isEligibleToDisconnect(self, ring_bonded_atoms)
Determine whether the atoms in ring_bonded atoms have characteristics that allow their intervening atom to be excised and these two atoms joined.
Bool
_disconnectIfEligible(self, iatom)
Disconnect iatom from its ring neighbors and join the ring neighbors to each other (contracting the ring), unless the conditions tested in _isEligibleToDisconnect are met.
 
_removeEligibleRingAtoms(self)
Remove ring atoms that can be removed, contracting rings to minimum size.
String
_genRep4(self)
Generate the partitioning='4' SMILES.
String
_getAromaticFromStarRep(self, star_rep)
Convert a "star" representation like '[*]1[*][*]1' to an aromatic/aliphatic representation, like '[a]1[a][a]1' or '[A]1[A][A]1', by matching against the current structure, then (for each match) replacing '*' by the aromatic designation of the matching atom in the original st, then picking the lowest-sorting match.
String
_aromatizeStarRep(self, match, star_rep)
Given a star rep and a match to it, replace each '*' with 'a' or 'A', depending on whether the corresponding matching atom was aromatic or not in the original st.
tuple
_isolateRingSystem(self, iatom_in_ring)
Given a structure with a ring system to which iatom_in_ring belongs, return a structure that is a copy of the ring system, only.
 
_genRep3a(self)
Return the partitioning-'3a' representation.
 
_reBond(self)
Break bonds between ring and non-ring atoms in self.st
Class Methods [hide private]
List
getPartitioningNamesAtLevels(cls)
Return a list of lists of partitioning names that hierarchy.Hierarchy can be initialized with for this particular hierarchy.
Static Methods [hide private]
String
_stripBrackets(sm)
Create a more compact representation of a SMARTS-like string by stripping brackets.
String
_subStar(sm)
Subsititute an asterisk ( '*' ) for each atomic symbol in the input SMILES, giving a new SMILES all of whose atoms are wildcards.
Class Variables [hide private]
  partitioning_names_at_levels = [['Stereo_SMILES'], ['SMILES'],...
Method Details [hide private]

getPartitioningNamesAtLevels(cls)
Class Method

 

Return a list of lists of partitioning names that hierarchy.Hierarchy can be initialized with for this particular hierarchy.

Returns: List
List of partitioning names

__init__(self, st_orig, smiles_stereo=None, smiles_nostereo=None)
(Constructor)

 

Create partitions for a single input structure.

Parameters:
  • st_orig (A structure.Structure object) - The structure whose representations will be generated
  • smiles_stereo (A schrodinger.structutils.smiles.SmilesGenerator object) - A generator for stereo SMILES; created if not passed
  • smiles_nostereo (A schrodinger.structutils.smiles.SmilesGenerator object) - A generator for non-stereo SMILES; created if not passed

getRep(self, partitioning)

 

Return the partition name (representation) of the structure at the specified partitioning.

Returns: String
Partitioning name

getReps(self)

 

Return a list containing the partition names (representations) of the structure at all partitionings.

Returns: List
List of partition names, one per partitioning

getFullReps(self)

 

Return dictionary of data associated with the representation at every partitioning. Mainly for debugging.

Returns: Dictionary
Dictionary of structural data for each partitioning.

_setSelfStInfo(self, st=None)

 

Isolate ring structure in self.st into self.ring_st and set self data structures to values consistent with self.st and self.ring_st.

Parameters:
  • st (A structure.Structure object) - A structure; if not specified, act on self.st. If specified, set self.st to this parameter.

_stripBrackets(sm)
Static Method

 

Create a more compact representation of a SMARTS-like string by stripping brackets. So '[*][*][*]' becomes '***'.

Parameters:
  • sm (String) - A SMILES string (will be None for some partitionings)
Returns: String
The string with brackets deleted

_setFullReps(self, partitioning, sm, rep, st)

 

Set results in the top-level data structure for the specified partitioning:

Parameters:
  • partitioning (String) - The partitioning to which this representation pertains.
  • sm (String) - SMILES-style representation of this partition (None for some partitionings)
  • rep (String) - Compact representation for this partition
  • st (structure.Structure object) - Structure object that is the basis for this partition (None for some partitionings)

_isEligibleToDisconnect(self, ring_bonded_atoms)

 

Determine whether the atoms in ring_bonded atoms have characteristics that allow their intervening atom to be excised and these two atoms joined. Called only for atom pairs that are bonded within a ring to another atom.

Parameters:
  • ring_bonded_atoms (List) - Exactly two ring neighbors of some ring atom that is in only a single sssr ring.
Returns: Bool
True if the central atom should be excised from the ring (and the neighbors attached to each other) and False otherwise. This is the case unless either (1) both atoms are in multiple rings with identical ring membership, or (2) the two atoms are bonded to each other.

_disconnectIfEligible(self, iatom)

 

Disconnect iatom from its ring neighbors and join the ring neighbors to each other (contracting the ring), unless the conditions tested in _isEligibleToDisconnect are met.

Parameters:
  • iatom (Integer) - An atom in self.st that is in only one ring.
Returns: Bool
True if the atom was excised; False otherwise

_genRep4(self)

 

Generate the partitioning='4' SMILES.

Returns: String
The partitioning-4 SMILES representation

_getAromaticFromStarRep(self, star_rep)

 

Convert a "star" representation like '[*]1[*][*]1' to an aromatic/aliphatic representation, like '[a]1[a][a]1' or '[A]1[A][A]1', by matching against the current structure, then (for each match) replacing '*' by the aromatic designation of the matching atom in the original st, then picking the lowest-sorting match. Uses _aromatizeStarRep() to convert each match from star to aromatic form.

Parameters:
  • star_rep (String) - A SMILES-like structure in the "star" representation
Returns: String
String in which '*' in the star_rep has been replaced by 'A' for aliphatics and 'a' for aromatic atoms.

_aromatizeStarRep(self, match, star_rep)

 

Given a star rep and a match to it, replace each '*' with 'a' or 'A', depending on whether the corresponding matching atom was aromatic or not in the original st.

Parameters:
  • match (List) - Atom numbers in self.ct that match the star_rep SMILES
  • star_rep - A SMILES whose atoms consist solely of '[*]' types
Returns: String
String in which '*' in the star_rep has been replaced by 'A' for aliphatics and 'a' for aromatic atoms.

_isolateRingSystem(self, iatom_in_ring)

 

Given a structure with a ring system to which iatom_in_ring belongs, return a structure that is a copy of the ring system, only.

Parameters:
  • iatom_in_ring (Integer) - An arbitrary index to an atom in a ring in self.st
Returns: tuple
The isolated ring structure, a map of the self.st atom numbers to to the new atom numbers, and a map of the new atom numbers to the atom numbers in self.st

_genRep3a(self)

 

Return the partitioning-'3a' representation. return: The partitioning-'3a' representation rtype: String

_subStar(sm)
Static Method

 

Subsititute an asterisk ( '*' ) for each atomic symbol in the input SMILES, giving a new SMILES all of whose atoms are wildcards. Note that in the expected use case, there are no bond indications.

Parameters:
  • sm (String) - A SMILES string
Returns: String
A SMILES string with atom types replaced with '[*]'

Class Variable Details [hide private]

partitioning_names_at_levels

Value:
[['Stereo_SMILES'],
 ['SMILES'],
 ['Arom_framework'],
 ['Framework', 'Arom_topology'],
 ['Topology'],
 ['sssr'],
 ['root']]