コード例 #1
0
ファイル: jybel.py プロジェクト: egonw/cinfony
 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)
コード例 #2
0
ファイル: jybel.py プロジェクト: ostrokach/cinfony
 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)