Package schrodinger :: Package application :: Package canvas :: Module fingerprint :: Class CanvasFingerprintGenerator
[hide private]
[frames] | no frames]

Class CanvasFingerprintGenerator

object --+
         |
        CanvasFingerprintGenerator
Known Subclasses:

A class to encapsulate canvas finger print generation. Fingerprints may be generated and returned as Fingerprint objects or may be written to a file.

Instance Methods [hide private]
 
__del__(self)
 
__init__(self, logger, default_type='Linear')
x.__init__(...) initializes x; see help(type(x)) for signature
 
debug(self, output)
Wrapper for debug logging, just to simplify logging
 
getDefaultAtomTypingScheme(self)
Once the fingerprint type has been set then this method will return the default atom typing scheme appropriate for that fingerprint type
 
getDescription(self)
Returns a string representing a summary of the current fingerprint settings
 
getCurrentType(self)
Returns the name of the fingerprint type current set:
 
setType(self, fp_type)
Set the type of fingerprints to be generated by this generator.
 
setPrecision(self, precision)
Set the number of bits to be used for fingerprint generation.
 
getPrecision(self)
Returns the current number of bits used for fingerprinting
 
setAtomBondTyping(self, atom_bond_typing)
Set the atom typing scheme.
 
getCurrentAtomBondTyping(self)
Returns the current atom bond typing value
 
_getFingerprinter(self)
A private method which will return a CanvasFingerprinter object appropriate to the current type and atom typing settings
 
generate(self, st, chmmol=False)
Return a fingerprint object using the current settings for type, bit width and atom typing for the Structure object st
 
open(self, filename)
Open a file to which fingerprints are to be written
 
write(self, st, id, chmmol=False)
Create a fingerprint from the structure 'st' and add it to the file with the ID 'id'.
 
close(self)
Close the file which was previously open for finger print generation

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  FINGERPRINT_TYPES = ['Linear', 'Radial', 'MolPrint2D', 'Atom P...
  SHORT_FINGERPRINT_TYPES = ['linear', 'radial', 'molprint2D', '...
  ATOM_TYPING_SCHEMES = [' 1. All atoms equivalent; all bonds eq...
  PRECISION = ['32', '64']
  DEFAULT_ATOM_TYPING_SCHEMES = {'dendritic': 10, 'linear': 10, ...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, logger, default_type='Linear')
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

setType(self, fp_type)

 

Set the type of fingerprints to be generated by this generator. The type must be one of the values in the class variable CanvasFingerPrintGenerator.FINGERPRINT_TYPE

setAtomBondTyping(self, atom_bond_typing)

 

Set the atom typing scheme. This must be an integer from 1 to the number of atom typing schemes. The atom typing schemes are described in the class variable ATOM_TYPING_SCHEMES

generate(self, st, chmmol=False)

 

Return a fingerprint object using the current settings for type, bit width and atom typing for the Structure object st

Parameters:
  • st (schrodinger.structure.Structure or canvas.base.chmmol object) - structure to generate the fingerprint for
  • chmmol (True if the structure is a chmmol object, False if it is a Structure object)

write(self, st, id, chmmol=False)

 

Create a fingerprint from the structure 'st' and add it to the file with the ID 'id'. If a file has not been opened then raise an exception

Parameters:
  • st (schrodinger.structure.Structure or canvas.base.chmmol object) - structure to generate the fingerprint for
  • chmmol (True if the structure is a chmmol object, False if it is a Structure object)

Class Variable Details [hide private]

FINGERPRINT_TYPES

Value:
['Linear',
 'Radial',
 'MolPrint2D',
 'Atom Pairs',
 'Atom Triplets',
 'Topological Torsions',
 'Dendritic']

SHORT_FINGERPRINT_TYPES

Value:
['linear',
 'radial',
 'molprint2D',
 'pairwise',
 'triplet',
 'torsion',
 'dendritic']

ATOM_TYPING_SCHEMES

Value:
[' 1. All atoms equivalent; all bonds equivalent.',
 ' 2. Atoms distinguished by HB acceptor/donor; all bonds equivalent.'\
,
 ' 3. Atoms distinguished by hybridization state; all bonds equivalent\
',
 ' 4. Atoms distinguished by functional type: {H}, {C}, {F,Cl}, {Br,I}\
, {N,0}, {S}, {other}; bonds by hybridization.',
 ' 5. Mol2 atom types; all bonds equivalent.',
...

DEFAULT_ATOM_TYPING_SCHEMES

Value:
{'dendritic': 10,
 'linear': 10,
 'molprint2D': 5,
 'pairwise': 9,
 'radial': 4,
 'torsion': 10,
 'triplet': 10}