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

Class FeatMapPoint

source code

                        object --+        
                                 |        
                       ??.instance --+    
                                     |    
rdChemicalFeatures.FreeChemicalFeature --+
                                         |
                                        FeatMapPoint

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
__init__( (object)arg1, (str)arg2) -> None :
source code
 
initFromFeat(self, feat)
>>> from rdkit import Geometry >>> 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)
>>> from rdkit import Geometry...
source code
 
GetDirMatch(self, other, useBest=True)
>>> from rdkit import Geometry >>> sfeat = ChemicalFeatures.FreeChemicalFeature('Aromatic','Foo',Geometry.Point3D(0,0,0)) >>> fmp = FeatMapPoint() >>> fmp.initFromFeat(sfeat) >>> fmp.GetDirMatch(sfeat) 1.0
source code

Inherited from rdChemicalFeatures.FreeChemicalFeature: GetFamily, GetId, GetPos, GetType, SetFamily, SetId, SetPos, SetType, __getinitargs__, __reduce__

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  weight = 0.0
  featDirs = None
hash(x)

Inherited from rdChemicalFeatures.FreeChemicalFeature: __instance_size__, __safe_for_unpickling__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

__init__( (object)arg1, (str)arg2) -> None :

    C++ signature :
        void __init__(_object*,std::string)

__init__( (object)arg1) -> None :
    Default Constructor

    C++ signature :
        void __init__(_object*)

__init__( (object)arg1, (str)family, (str)type, (Point3D)loc [, (int)id=-1]) -> None :
    Constructor with family, type and location specified

    C++ signature :
        void __init__(_object*,std::string,std::string,RDGeom::Point3D [,int=-1])

__init__( (object)arg1, (str)family, (Point3D)loc) -> None :
    constructor with family and location specified, empty type and id

    C++ signature :
        void __init__(_object*,std::string,RDGeom::Point3D)

Overrides: object.__init__
(inherited documentation)

initFromFeat(self, feat)

source code 

>>> from rdkit import Geometry
>>> 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 

>>> from rdkit import Geometry
>>> 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 

>>> from rdkit import Geometry
>>> 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