Package rdkit :: Package Chem :: Package FeatMaps :: Module FeatMapPoint :: Class FeatMapPoint
[hide private]
[frames] | no frames]

Class FeatMapPoint

source code

ChemicalFeatures.FreeChemicalFeature --+
                                       |
                                      FeatMapPoint

Instance Methods [hide private]
 
__init__(self, *args, **kwargs) source code
 
initFromFeat(self, feat)
>>> sfeat = ChemicalFeatures.FreeChemicalFeature('Aromatic','Foo',Geometry.Point3D(0,0,0)) >>> fmp = FeatMapPoint() >>> fmp.initFromFeat(sfeat) >>> fmp.GetFamily()==sfeat.GetFamily() True >>> fmp.GetType()==sfeat.GetType() True >>> list(fmp.GetPos()) [0.0, 0.0, 0.0] >>> fmp.featDirs == [] True
source code
 
GetDist2(self, other) source code
 
GetDirMatch(self, other, useBest=True)
>>> sfeat = ChemicalFeatures.FreeChemicalFeature('Aromatic','Foo',Geometry.Point3D(0,0,0)) >>> fmp = FeatMapPoint() >>> fmp.initFromFeat(sfeat) >>> fmp.GetDirMatch(sfeat) 1.0
source code
Class Variables [hide private]
  weight = 0.0
  featDirs = None
hash(x)
Method Details [hide private]

initFromFeat(self, feat)

source code 


>>> sfeat = ChemicalFeatures.FreeChemicalFeature('Aromatic','Foo',Geometry.Point3D(0,0,0))
>>> fmp = FeatMapPoint()
>>> fmp.initFromFeat(sfeat)
>>> fmp.GetFamily()==sfeat.GetFamily()
True
>>> fmp.GetType()==sfeat.GetType()
True
>>> list(fmp.GetPos())
[0.0, 0.0, 0.0]
>>> fmp.featDirs == []
True

>>> sfeat.featDirs = [Geometry.Point3D(1.0,0,0)]
>>> fmp.initFromFeat(sfeat)
>>> len(fmp.featDirs)
1

GetDist2(self, other)

source code 


>>> sfeat = ChemicalFeatures.FreeChemicalFeature('Aromatic','Foo',Geometry.Point3D(0,0,0))
>>> fmp = FeatMapPoint()
>>> fmp.initFromFeat(sfeat)
>>> fmp.GetDist2(sfeat)
0.0
>>> sfeat.SetPos(Geometry.Point3D(2,0,0))
>>> fmp.GetDist2(sfeat)
4.0

GetDirMatch(self, other, useBest=True)

source code 


>>> sfeat = ChemicalFeatures.FreeChemicalFeature('Aromatic','Foo',Geometry.Point3D(0,0,0))
>>> fmp = FeatMapPoint()
>>> fmp.initFromFeat(sfeat)
>>> fmp.GetDirMatch(sfeat)
1.0

>>> sfeat.featDirs=[Geometry.Point3D(0,0,1),Geometry.Point3D(0,0,-1)]
>>> fmp.featDirs=[Geometry.Point3D(0,0,1),Geometry.Point3D(1,0,0)]
>>> fmp.GetDirMatch(sfeat)
1.0
>>> fmp.GetDirMatch(sfeat,useBest=True)
1.0
>>> fmp.GetDirMatch(sfeat,useBest=False)
0.0

>>> sfeat.featDirs=[Geometry.Point3D(0,0,1)]
>>> fmp.GetDirMatch(sfeat,useBest=False)
0.5

>>> sfeat.featDirs=[Geometry.Point3D(0,0,1)]
>>> fmp.featDirs=[Geometry.Point3D(0,0,-1)]
>>> fmp.GetDirMatch(sfeat)
-1.0
>>> fmp.GetDirMatch(sfeat,useBest=False)
-1.0