schrodinger.application.canvas.fingerprintgui module¶
Higher-level wrappers to the Canvas Fingerprint generation and manipulation classes with GUI components.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.canvas.fingerprintgui.CanvasFingerprintGeneratorGUI(logger, default_type='Linear')¶
Bases:
schrodinger.application.canvas.fingerprint.CanvasFingerprintGenerator
A subclass of the canvas fingerprint generator which is to be used from a program with a TKInter interface. This class has methods for creating a component which displays all the fingerprint generation options and takes care of managing the internal state
- __init__(logger, default_type='Linear')¶
- getGUI()¶
Returns a GUI component which displays the fingerprint generation options
- bitCB(value)¶
A callback function for the Bitsize radio buttons
- Parameters
value (unused) – unused
- atomTypingCB(row)¶
Called when the atom typing selection changes
- Parameters
row (int) – the row of the listwidget that was selected
- FPTypeCB(fp_type)¶
A callback for the fingerprint type. Sets the default option in the list of atom typing schemes based on the fingerprint type
- Parameters
fp_type (str) – the text selected in the combobox
- resetfp()¶
Allow reset of the fingerprint generator between cluster calculations.
See EV:91489 and 101763
- ATOM_TYPING_SCHEMES = [' 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.', ' 6. Atoms distinguished by whether terminal, halogen, HB acceptor/donor bonds distinguished by bond order', ' 7. Atomic number and bond order', ' 8. Atoms distinguished by ring size, aromaticity, HB acceptor/donor, ionization potential, whether terminal, whether halogen; bonds distinguished by bond order', ' 9. Carhart atom types (atom-pairs approach); all bonds equivalent.', '10. Daylight invariant atom types; bonds distinguished by bond order.', '11. Same as 7, but aromatic distinguished from non-aromatic', '12. Same as 10, but cyclic aliphatic distinguished from acyclic aliphatic']¶
- DEFAULT_ATOM_TYPING_SCHEMES = {'dendritic': 10, 'linear': 10, 'molprint2D': 5, 'pairwise': 9, 'radial': 4, 'torsion': 10, 'triplet': 10}¶
- FINGERPRINT_TYPES = ['Linear', 'Radial', 'MolPrint2D', 'Atom Pairs', 'Atom Triplets', 'Topological Torsions', 'Dendritic']¶
- PRECISION = [32, 64]¶
- SHORT_FINGERPRINT_TYPES = ['linear', 'radial', 'molprint2D', 'pairwise', 'triplet', 'torsion', 'dendritic']¶
- close()¶
Close the file which was previously open for finger print generation
- debug(output)¶
Wrapper for debug logging, just to simplify logging
- generate(st, chmmol=False, stereo=0)¶
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
stereo (canvas.ChmMmctAdaptor.StereoType) – stereo type that should be used when creating chmmol from a Structure object
- getCurrentAtomBondTyping()¶
Returns the current atom bond typing value
- getCurrentType()¶
Returns the name of the fingerprint type current set:
- getDefaultAtomTypingScheme()¶
Once the fingerprint type has been set then this method will return the default atom typing scheme appropriate for that fingerprint type
- getDescription()¶
Returns a string representing a summary of the current fingerprint settings
- getPrecision()¶
Returns the current number of bits used for fingerprinting
- open(filename)¶
Open a file to which fingerprints are to be written
- setAtomBondTyping(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
- setPrecision(precision)¶
Set the number of bits to be used for fingerprint generation.
- setType(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
- write(st, fingerprint_id, chmmol=False)¶
Create a fingerprint from the structure ‘st’ and add it to the file with the ID ‘fingerprint_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