def calcfp(self, fptype="FP2"): """Calculate a molecular fingerprint. Optional parameters: fptype -- the fingerprint type (default is "FP2"). See the fps variable for a list of of available fingerprint types. """ fp = ob.vectorUnsignedInt() try: fingerprinter = _fingerprinters[fptype] except KeyError: raise ValueError("%s is not a recognised Open Babel Fingerprint type" % fptype) fingerprinter.GetFingerprint(self.OBMol, fp) return Fingerprint(fp)
def calcfp(self, fptype="FP2"): """Calculate a molecular fingerprint. Optional parameters: fptype -- the fingerprint type (default is "FP2"). See the fps variable for a list of of available fingerprint types. """ fp = ob.vectorUnsignedInt() try: fingerprinter = _fingerprinters[fptype] except KeyError: raise ValueError( "%s is not a recognised Open Babel Fingerprint type" % fptype) fingerprinter.GetFingerprint(self.OBMol, fp) return Fingerprint(fp)