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')

Initialize self. See help(type(self)) for accurate signature.

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']
__class__

alias of builtins.type

__del__()
__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.canvas.fingerprintgui', '__doc__': '\n A subclass of the canvas fingerprint generator which is to be\n used from a program with a TKInter interface. This class has methods\n for creating a component which displays all the fingerprint generation\n options and takes care of managing the internal state\n ', '__init__': <function CanvasFingerprintGeneratorGUI.__init__>, 'getGUI': <function CanvasFingerprintGeneratorGUI.getGUI>, 'bitCB': <function CanvasFingerprintGeneratorGUI.bitCB>, 'atomTypingCB': <function CanvasFingerprintGeneratorGUI.atomTypingCB>, 'FPTypeCB': <function CanvasFingerprintGeneratorGUI.FPTypeCB>, 'resetfp': <function CanvasFingerprintGeneratorGUI.resetfp>})
__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.canvas.fingerprintgui'
__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)

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)

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
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