Add some 3D molecular descriptors (#1084)

* update .gitignore

* foundation for 3D descriptors
move PBF into core

* cleanup work

* a bit more cleanup

* move the principal moments calc to MolTransforms

* cleanup

* cleanups

* add caching of the principal moments and values

* do not include the 3D descriptors in MolDescriptors.h

* the properties are computed

* add PMI descriptors and tests

* add tests for NPR descriptors

* return 0 when the largest PMI is zero

* PMI edge case tests

* NPR edge case tests

* PBF edge case tests

* PBF edge case tests

* more edge cases

* add a few more 3d descriptors

* add defns to docs

* tests for the new descriptors

* add versions to new descriptors

* add 3d descriptors to python wrapper

* add eigen support to the travis build

* try to get non-windows builds working

* remove computeCovarianceMatrix() from java wrapper

* make pmi property names "private"
This commit is contained in:
Greg Landrum
2016-10-10 14:34:08 +02:00
committed by Brian Kelley
parent 7fa3cae4cd
commit 4f2ec84e7b
25 changed files with 44648 additions and 72 deletions

5
.gitignore vendored
View File

@@ -11,6 +11,10 @@ __pycache__/
*.so
*.pyc
/lib/
*.pyd
#- autosaves and backups
*~
#- Files created during build phase
/build*/
@@ -66,4 +70,3 @@ __pycache__/
/rdkit/ML/Data/test_data/testgeneral.dat.pkl
/rdkit/ML/Data/test_data/testquant.qdat.pkl

View File

@@ -37,6 +37,8 @@ install:
# install the conda boost packages from the RDKit binstar channel.
- conda install -q -c rdkit boost=1.55.0
# install eigen from conda-forge
- conda install -q -c conda-forge eigen
before_script:

View File

@@ -39,7 +39,7 @@ option(RDK_USE_BOOST_SERIALIZATION "Use the boost serialization library if avail
option(RDK_BUILD_TEST_GZIP "Build the gzip'd stream test" OFF)
option(RDK_OPTIMIZE_NATIVE "Use native features while compiling." ON)
option(RDK_USE_STRICT_ROTOR_DEFINITION "Use the most strict rotatable bond definition" ON)
option(RDK_BUILD_DESCRIPTORS3D "Build the 3D descriptors calculators, requires Eigen3 to be installed" ON)
if(NOT MSVC)
if(RDK_OPTIMIZE_NATIVE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcnt")
@@ -232,6 +232,18 @@ include_directories(${RDKit_CodeDir})
# detect it.
string(REGEX MATCH "clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER}")
if(RDK_BUILD_DESCRIPTORS3D)
find_package(Eigen3)
if(EIGEN3_FOUND)
ADD_DEFINITIONS("-DRDK_HAS_EIGEN3" "-DRDK_BUILD_DESCRIPTORS3D")
include_directories(${EIGEN3_INCLUDE_DIR})
else(EIGEN3_FOUND)
message("Eigen3 not found, disabling the Descriptors3D build.")
set(RDK_BUILD_DESCRIPTORS3D OFF)
endif(EIGEN3_FOUND)
endif(RDK_BUILD_DESCRIPTORS3D)
find_package (Threads)
if(RDK_BUILD_THREADSAFE_SSS)
set(T_LIBS ${Boost_LIBRARIES})

View File

@@ -1,9 +1,17 @@
if(RDK_BUILD_DESCRIPTORS3D)
set(DESC3D_HDRS MolDescriptors3D.h PBF.h PMI.h)
set(DESC3D_SOURCES PBF.cpp PMI.cpp)
endif(RDK_BUILD_DESCRIPTORS3D)
rdkit_library(Descriptors
Crippen.cpp MolDescriptors.cpp MolSurf.cpp Lipinski.cpp ConnectivityDescriptors.cpp
MQN.cpp
Property.cpp
LINK_LIBRARIES PartialCharges SmilesParse FileParsers Subgraphs SubstructMatch
${RDKit_THREAD_LIBS})
${DESC3D_SOURCES}
LINK_LIBRARIES PartialCharges SmilesParse FileParsers Subgraphs SubstructMatch MolTransforms GraphMol
EigenSolvers ${RDKit_THREAD_LIBS})
rdkit_headers(Crippen.h Lipinski.h
MolDescriptors.h
@@ -11,13 +19,19 @@ rdkit_headers(Crippen.h Lipinski.h
ConnectivityDescriptors.h MQN.h
RegisterDescriptor.h
Property.h
${DESC3D_HDRS}
DEST GraphMol/Descriptors)
rdkit_test(testDescriptors test.cpp
LINK_LIBRARIES PartialCharges Descriptors FileParsers SmilesParse Subgraphs SubstructMatch GraphMol DataStructs RDGeneral RDGeometryLib ${RDKit_THREAD_LIBS} )
rdkit_test(testDescriptors test.cpp
LINK_LIBRARIES PartialCharges Descriptors FileParsers SmilesParse Subgraphs SubstructMatch MolTransforms GraphMol EigenSolvers DataStructs RDGeneral RDGeometryLib ${RDKit_THREAD_LIBS} )
if(RDK_BUILD_DESCRIPTORS3D)
rdkit_test(testPBF testPBF.cpp
LINK_LIBRARIES Descriptors FileParsers SmilesParse MolTransforms GraphMol DataStructs EigenSolvers RDGeneral RDGeometryLib ${RDKit_THREAD_LIBS} )
rdkit_test(test3D test3D.cpp
LINK_LIBRARIES Descriptors FileParsers SmilesParse MolTransforms GraphMol DataStructs EigenSolvers RDGeneral RDGeometryLib ${RDKit_THREAD_LIBS} )
endif(RDK_BUILD_DESCRIPTORS3D)
add_subdirectory(Wrap)

View File

@@ -0,0 +1,17 @@
//
// Copyright (C) 2016 Greg Landrum
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#ifndef RD_MOLDESCRIPTORS3D_H_SEPT2016
#define RD_MOLDESCRIPTORS3D_H_SEPT2016
#include <GraphMol/Descriptors/PBF.h>
#include <GraphMol/Descriptors/PMI.h>
#endif

View File

@@ -0,0 +1,142 @@
//
// Copyright (c) 2012, Institue of Cancer Research.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
// * Neither the name of Institue of Cancer Research.
// nor the names of its contributors may be used to endorse or promote
// products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// For more information on the Plane of Best Fit please see http://pubs.acs.org/doi/abs/10.1021/ci300293f
//
// If this code has been useful to you, please include the reference
// in any work which has made use of it:
// Plane of Best Fit: A Novel Method to Characterize the Three-Dimensionality of Molecules, Nicholas C. Firth, Nathan Brown, and Julian Blagg, Journal of Chemical Information and Modeling 2012 52 (10), 2516-2525
//
//
// Created by Nicholas Firth, November 2011
// Modified by Greg Landrum for inclusion in the RDKit distribution November 2012
// Further modified by Greg Landrum for inclusion in the RDKit core September 2016
//
#include <GraphMol/RDKitBase.h>
#include <GraphMol/MolTransforms/MolTransforms.h>
#include "PBF.h"
#include <Numerics/Matrix.h>
#include <Numerics/SquareMatrix.h>
#include <Numerics/SymmMatrix.h>
#include <boost/foreach.hpp>
#include <Eigen/Dense>
namespace RDKit {
namespace Descriptors{
namespace {
double distanceFromAPlane(const RDGeom::Point3D &pt,const std::vector<double> &plane, double denom){
double numer=0.0;
numer = std::abs(pt.x*plane[0]+pt.y*plane[1]+pt.z*plane[2]+plane[3]);
return numer/denom;
}
bool getBestFitPlane(const Conformer &conf,
const std::vector<RDGeom::Point3D> &points,
std::vector<double> &plane,
const std::vector<double> *weights) {
PRECONDITION((!weights || weights->size()>=points.size()),"bad weights vector");
PRECONDITION(plane.size()>=4,"bad plane");
RDGeom::Point3D origin(0,0,0);
double wSum=0.0;
for(unsigned int i=0;i<points.size();++i){
if(weights){
double w=(*weights)[i];
wSum+=w;
origin+=points[i]*w;
} else {
wSum+=1;
origin+=points[i];
}
}
origin /= wSum;
Eigen::Matrix3d evects;
Eigen::Vector3d evals;
MolTransforms::computePrincipalAxesAndMoments(conf,evects,evals,false,weights);
RDGeom::Point3D normal;
normal.x=evects(0,0);
normal.y=evects(1,0);
normal.z=evects(2,0);
plane[0] = normal.x;
plane[1] = normal.y;
plane[2] = normal.z;
plane[3] = -1*normal.dotProduct(origin);
return true;
}
} //end of anonymous namespace
double PBF(const ROMol& mol,int confId){
PRECONDITION(mol.getNumConformers()>=1,"molecule has no conformers")
unsigned int numAtoms = mol.getNumAtoms();
if(numAtoms<4) return 0;
const Conformer &conf = mol.getConformer(confId);
if(!conf.is3D()) return 0 ;
std::vector<RDGeom::Point3D> points;
points.reserve(numAtoms);
for(unsigned int i=0; i<numAtoms; ++i){
points.push_back(conf.getAtomPos(i));
}
std::vector<double> plane(4);
if(!getBestFitPlane(conf,points,plane,NULL)){
// the eigenvalue calculation failed, return 0
// FIX: throw an exception here?
return 0.0;
}
double denom=0.0;
for(unsigned int i=0; i<3; ++i){
denom += plane[i]*plane[i];
}
denom = sqrt(denom);
double res=0.0;
for(unsigned int i=0; i<numAtoms; ++i){
res+= distanceFromAPlane(points[i], plane, denom);
}
res /= numAtoms;
return res;
}
} // end of Descriptors namespace
} // end of RDKit namespace

View File

@@ -0,0 +1,55 @@
//
// Copyright (c) 2012, Institue of Cancer Research.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
// * Neither the name of Institue of Cancer Research.
// nor the names of its contributors may be used to endorse or promote
// products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// For more information on the Plane of Best Fit please see http://pubs.acs.org/doi/abs/10.1021/ci300293f
//
// If this code has been useful to you, please include the reference
// in any work which has made use of it:
// Plane of Best Fit: A Novel Method to Characterize the Three-Dimensionality of Molecules, Nicholas C. Firth, Nathan Brown, and Julian Blagg, Journal of Chemical Information and Modeling 2012 52 (10), 2516-2525
//
//
// Created by Nicholas Firth, November 2011
// Modifications by Greg Landrum for inclusion in the RDKit core, September 2016
#ifndef PBFRDKIT_H_SEPT2016
#define PBFRDKIT_H_SEPT2016
#ifdef RDK_BUILD_DESCRIPTORS3D
namespace RDKit {
class ROMol;
namespace Descriptors {
const std::string PBFVersion = "1.0.0";
double PBF(const ROMol&,int confId=-1);
}
}
#endif
#endif

View File

@@ -0,0 +1,206 @@
//
// Copyright (C) 2016 Greg Landrum
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <GraphMol/RDKitBase.h>
#include <GraphMol/MolTransforms/MolTransforms.h>
#include <Geometry/point.h>
#include "PMI.h"
#include <Eigen/Dense>
namespace RDKit {
namespace Descriptors{
namespace {
bool getMoments(const ROMol& mol,int confId, bool useAtomicMasses,
double &pm1, double &pm2, double &pm3){
PRECONDITION(mol.getNumConformers()>=1,"molecule has no conformers");
const char *pn1 = useAtomicMasses ? "_PMI1_mass" : "_PMI1";
const char *pn2 = useAtomicMasses ? "_PMI2_mass" : "_PMI2";
const char *pn3 = useAtomicMasses ? "_PMI3_mass" : "_PMI3";
if(mol.hasProp(pn1) && mol.hasProp(pn2) && mol.hasProp(pn3) ) {
mol.getProp(pn1,pm1);
mol.getProp(pn2,pm2);
mol.getProp(pn3,pm3);
return true;
}
const Conformer &conf=mol.getConformer(confId);
Eigen::Matrix3d axes;
Eigen::Vector3d moments;
bool res;
bool ignoreHs=false;
if(useAtomicMasses){
std::vector<double> weights;
weights.resize(mol.getNumAtoms());
for(ROMol::ConstAtomIterator cai=mol.beginAtoms();
cai!=mol.endAtoms();++cai){
weights[(*cai)->getIdx()] = (*cai)->getMass();
}
res = MolTransforms::computePrincipalAxesAndMoments(conf,axes,moments,ignoreHs,false,&weights);
} else {
res = MolTransforms::computePrincipalAxesAndMoments(conf,axes,moments,ignoreHs);
}
if(res){
pm1 = moments(0);
pm2 = moments(1);
pm3 = moments(2);
//std::cerr<<" moments: "<<pm1<<" "<<pm2<<" "<<pm3<<std::endl;
mol.setProp(pn1,pm1,true);
mol.setProp(pn2,pm2,true);
mol.setProp(pn3,pm3,true);
}
return res;
}
} // end of anonymous namespace
double NPR1(const ROMol& mol, int confId, bool useAtomicMasses){
PRECONDITION(mol.getNumConformers()>=1,"molecule has no conformers");
double pm1,pm2,pm3;
if(!getMoments(mol,confId,useAtomicMasses,pm1,pm2,pm3)){
// the eigenvector calculation failed
return 0.0; // FIX: throw an exception here?
}
if(pm3<1e-8) return 0.0;
return pm1/pm3;
}
double NPR2(const ROMol& mol, int confId, bool useAtomicMasses){
PRECONDITION(mol.getNumConformers()>=1,"molecule has no conformers");
double pm1,pm2,pm3;
if(!getMoments(mol,confId,useAtomicMasses,pm1,pm2,pm3)){
// the eigenvector calculation failed
return 0.0; // FIX: throw an exception here?
}
if(pm3<1e-8) return 0.0;
return pm2/pm3;
}
double PMI1(const ROMol& mol, int confId, bool useAtomicMasses){
PRECONDITION(mol.getNumConformers()>=1,"molecule has no conformers");
double pm1,pm2,pm3;
if(!getMoments(mol,confId,useAtomicMasses,pm1,pm2,pm3)){
// the eigenvector calculation failed
return 0.0; // FIX: throw an exception here?
}
return pm1;
}
double PMI2(const ROMol& mol, int confId, bool useAtomicMasses){
PRECONDITION(mol.getNumConformers()>=1,"molecule has no conformers");
double pm1,pm2,pm3;
if(!getMoments(mol,confId,useAtomicMasses,pm1,pm2,pm3)){
// the eigenvector calculation failed
return 0.0; // FIX: throw an exception here?
}
return pm2;
}
double PMI3(const ROMol& mol, int confId, bool useAtomicMasses){
PRECONDITION(mol.getNumConformers()>=1,"molecule has no conformers");
double pm1,pm2,pm3;
if(!getMoments(mol,confId,useAtomicMasses,pm1,pm2,pm3)){
// the eigenvector calculation failed
return 0.0; // FIX: throw an exception here?
}
return pm3;
}
double radiusOfGyration(const ROMol& mol,int confId,
bool useAtomicMasses){
PRECONDITION(mol.getNumConformers()>=1,"molecule has no conformers");
double pm1,pm2,pm3;
if(!getMoments(mol,confId,useAtomicMasses,pm1,pm2,pm3)){
// the eigenvector calculation failed
return 0.0; // FIX: throw an exception here?
}
double denom;
if(useAtomicMasses){
denom = 0.0;
for(ROMol::ConstAtomIterator cai = mol.beginAtoms();
cai!=mol.endAtoms();++cai){
denom += (*cai)->getMass();
}
} else {
denom = mol.getNumAtoms();
}
if(denom<1e-8) return 0.0;
if(pm1<1e-4) {
// planar
return sqrt(sqrt(pm2*pm3)/denom);
} else {
return sqrt(2*M_PI*pow(pm1*pm2*pm3,1./3)/denom);
}
}
double inertialShapeFactor(const ROMol& mol,int confId,
bool useAtomicMasses){
PRECONDITION(mol.getNumConformers()>=1,"molecule has no conformers");
double pm1,pm2,pm3;
if(!getMoments(mol,confId,useAtomicMasses,pm1,pm2,pm3)){
// the eigenvector calculation failed
return 0.0; // FIX: throw an exception here?
}
if(pm1<1e-4 || pm3<1e-4) {
// planar or no coordinates
return 0.0;
} else {
return pm2 / (pm1*pm3);
}
}
double eccentricity(const ROMol& mol,int confId,
bool useAtomicMasses){
PRECONDITION(mol.getNumConformers()>=1,"molecule has no conformers");
double pm1,pm2,pm3;
if(!getMoments(mol,confId,useAtomicMasses,pm1,pm2,pm3)){
// the eigenvector calculation failed
return 0.0; // FIX: throw an exception here?
}
if(pm3<1e-4) {
// no coordinates
return 0.0;
} else {
return sqrt(pm3*pm3-pm1*pm1) / pm3;
}
}
double asphericity(const ROMol& mol,int confId,
bool useAtomicMasses){
PRECONDITION(mol.getNumConformers()>=1,"molecule has no conformers");
double pm1,pm2,pm3;
if(!getMoments(mol,confId,useAtomicMasses,pm1,pm2,pm3)){
// the eigenvector calculation failed
return 0.0; // FIX: throw an exception here?
}
if(pm3<1e-4) {
// no coordinates
return 0.0;
} else {
return 0.5 * (pow(pm3-pm2,2) + pow(pm3-pm1,2) + pow(pm2-pm1,2))/
(pm1*pm1+pm2*pm2+pm3*pm3);
}
}
double spherocityIndex(const ROMol& mol,int confId){
PRECONDITION(mol.getNumConformers()>=1,"molecule has no conformers");
bool useAtomicMasses=false;
double pm1,pm2,pm3;
if(!getMoments(mol,confId,useAtomicMasses,pm1,pm2,pm3)){
// the eigenvector calculation failed
return 0.0; // FIX: throw an exception here?
}
if(pm3<1e-4) {
// no coordinates
return 0.0;
} else {
return 3. * pm1 / (pm1+pm2+pm3);
}
}
} // end of Descriptors namespace
} // end of RDKit namespace

View File

@@ -0,0 +1,102 @@
//
// Copyright (C) 2016 Greg Landrum
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#ifndef PMI_H_SEPT2016
#define PMI_H_SEPT2016
#ifdef RDK_BUILD_DESCRIPTORS3D
namespace RDKit {
class ROMol;
namespace Descriptors {
//! Normalized principal moments ratio 1 (=I1/I3)
//! from Sauer and Schwarz JCIM 43:987-1003 (2003)
//! https://dx.doi.org/10.1021/ci025599w
double NPR1(const ROMol&, int confId=-1, bool useAtomicMasses=true);
const std::string NPR1Version = "1.0.0";
//! Normalized principal moments ratio 2 (=I2/I3)
//! from Sauer and Schwarz JCIM 43:987-1003 (2003)
//! https://dx.doi.org/10.1021/ci025599w
double NPR2(const ROMol&, int confId=-1, bool useAtomicMasses=true);
const std::string NPR2Version = "1.0.0";
//! First (smallest) principal moment of inertia
double PMI1(const ROMol&, int confId=-1, bool useAtomicMasses=true);
const std::string PMI1Version = "1.0.0";
//! second principal moment of inertia
double PMI2(const ROMol&, int confId=-1, bool useAtomicMasses=true);
const std::string PMI2Version = "1.0.0";
//! Third (largest) principal moment of inertia
double PMI3(const ROMol&, int confId=-1, bool useAtomicMasses=true);
const std::string PMI3Version = "1.0.0";
/*!
Radius of gyration
from Todeschini and Consoni "Descriptors from Molecular Geometry"
Handbook of Chemoinformatics
http://dx.doi.org/10.1002/9783527618279.ch37
Definition:
for planar molecules: sqrt( sqrt(pm3*pm2)/MW )
for nonplanar molecules: sqrt( 2*pi*pow(pm3*pm2*pm1,1/3)/MW )
*/
double radiusOfGyration(const ROMol&,int confId=-1,
bool useAtomicMasses=true);
const std::string radiusOfGyrationVersion = "1.0.0";
/*!
Inertial shape factor
from Todeschini and Consoni "Descriptors from Molecular Geometry"
Handbook of Chemoinformatics
http://dx.doi.org/10.1002/9783527618279.ch37
Definition:
pm2 / (pm1*pm3)
*/
double inertialShapeFactor(const ROMol&,int confId=-1,
bool useAtomicMasses=true);
const std::string inertialShapeFactorVersion = "1.0.0";
/*!
Molecular eccentricity
from Todeschini and Consoni "Descriptors from Molecular Geometry"
Handbook of Chemoinformatics
http://dx.doi.org/10.1002/9783527618279.ch37
Definition:
sqrt(pm3**2 -pm1**2) / pm3**2
*/
double eccentricity(const ROMol&,int confId=-1,
bool useAtomicMasses=true);
const std::string eccentricityVersion = "1.0.0";
/*!
molecular asphericity
from Todeschini and Consoni "Descriptors from Molecular Geometry"
Handbook of Chemoinformatics
http://dx.doi.org/10.1002/9783527618279.ch37
Definition:
0.5 * ((pm3-pm2)**2 + (pm3-pm1)**2 + (pm2-pm1)**2)/(pm1**2+pm2**2+pm3**2)
*/
double asphericity(const ROMol&,int confId=-1,
bool useAtomicMasses=true);
const std::string asphericityVersion = "1.0.0";
/*!
Spherocity index
from Todeschini and Consoni "Descriptors from Molecular Geometry"
Handbook of Chemoinformatics
http://dx.doi.org/10.1002/9783527618279.ch37
Definition:
3 * pm1 / (pm1+pm2+pm3) where the moments are calculated without weights
*/
double spherocityIndex(const ROMol&,int confId=-1);
const std::string spherocityIndexVersion = "1.0.0";
}
}
#endif
#endif

View File

@@ -1,11 +1,7 @@
rdkit_python_extension(rdMolDescriptors rdMolDescriptors.cpp
DEST Chem
LINK_LIBRARIES
LINK_LIBRARIES Descriptors PartialCharges Fingerprints FileParsers SmilesParse Subgraphs SubstructMatch GraphMol DataStructs RDGeneral RDGeometryLib RDBoost )
LINK_LIBRARIES Descriptors PartialCharges Fingerprints FileParsers SmilesParse Subgraphs
SubstructMatch MolTransforms GraphMol EigenSolvers DataStructs RDGeneral RDGeometryLib RDBoost )
add_pytest(pyMolDescriptors ${CMAKE_CURRENT_SOURCE_DIR}/testMolDescriptors.py)

View File

@@ -22,6 +22,10 @@
#include <GraphMol/Fingerprints/MACCS.h>
#include <DataStructs/BitVects.h>
#ifdef RDK_BUILD_DESCRIPTORS3D
#include <GraphMol/Descriptors/MolDescriptors3D.h>
#endif
#include <vector>
namespace python = boost::python;
@@ -840,9 +844,9 @@ BOOST_PYTHON_MODULE(rdMolDescriptors) {
.value("StrictLinkages", RDKit::Descriptors::StrictLinkages)
.value("Default", RDKit::Descriptors::Default)
;
#ifdef RDK_USE_STRICT_ROTOR_DEFINITION
docString=
docString=
"returns the number of rotatable bonds for a molecule.\n\
strict = NumRotatableBondsOptions.NonStrict - Simple rotatable bond definition.\n\
strict = NumRotatableBondsOptions.Strict - (default) does not count things like\n\
@@ -879,7 +883,7 @@ BOOST_PYTHON_MODULE(rdMolDescriptors) {
(python::arg("mol"),
python::arg("strict")),
docString.c_str());
python::def(
"CalcNumRotatableBonds", (unsigned int (*)(const RDKit::ROMol&,
RDKit::Descriptors::NumRotatableBondsOptions))
@@ -890,7 +894,7 @@ BOOST_PYTHON_MODULE(rdMolDescriptors) {
python::scope().attr("_CalcNumRotatableBonds_version") =
RDKit::Descriptors::NumRotatableBondsVersion;
docString = "returns the number of rings for a molecule";
python::def("CalcNumRings", RDKit::Descriptors::calcNumRings,
(python::arg("mol")), docString.c_str());
@@ -1200,15 +1204,106 @@ BOOST_PYTHON_MODULE(rdMolDescriptors) {
docString.c_str(),
python::no_init)
.def("Match", &Queries::RangeQuery<double, RDKit::ROMol const&, true>::Match);
docString = "Generates a Range property for the specified property, between min and max\n"
"query = MakePropertyRangeQuery('exactmw', 0, 500)\n"
"query.Match( mol )";
python::def("MakePropertyRangeQuery",
RDKit::Descriptors::makePropertyRangeQuery,
(python::arg("name"), python::arg("min"), python::arg("max")), docString.c_str(),
python::return_value_policy<python::manage_new_object>());
#ifdef RDK_BUILD_DESCRIPTORS3D
python::scope().attr("_CalcPBF_version") =
RDKit::Descriptors::PBFVersion;
docString =
"Returns the PBF (plane of best fit) descriptor (http://dx.doi.org/10.1021/ci300293f)";
python::def("CalcPBF", RDKit::Descriptors::PBF,
(python::arg("mol"), python::arg("confId") = -1),
docString.c_str());
python::scope().attr("_CalcNPR1_version") =
RDKit::Descriptors::NPR1Version;
docString =
"";
python::def("CalcNPR1", RDKit::Descriptors::NPR1,
(python::arg("mol"), python::arg("confId") = -1,
python::arg("useAtomicMasses")=true),
docString.c_str());
python::scope().attr("_CalcNPR2_version") =
RDKit::Descriptors::NPR2Version;
docString =
"";
python::def("CalcNPR2", RDKit::Descriptors::NPR2,
(python::arg("mol"), python::arg("confId") = -1,
python::arg("useAtomicMasses")=true),
docString.c_str());
python::scope().attr("_CalcPMI1_version") =
RDKit::Descriptors::PMI1Version;
docString =
"";
python::def("CalcPMI1", RDKit::Descriptors::PMI1,
(python::arg("mol"), python::arg("confId") = -1,
python::arg("useAtomicMasses")=true),
docString.c_str());
python::scope().attr("_CalcPMI2_version") =
RDKit::Descriptors::PMI2Version;
docString =
"";
python::def("CalcPMI2", RDKit::Descriptors::PMI2,
(python::arg("mol"), python::arg("confId") = -1,
python::arg("useAtomicMasses")=true),
docString.c_str());
python::scope().attr("_CalcPMI3_version") =
RDKit::Descriptors::PMI3Version;
docString =
"";
python::def("CalcPMI3", RDKit::Descriptors::PMI3,
(python::arg("mol"), python::arg("confId") = -1,
python::arg("useAtomicMasses")=true),
docString.c_str());
python::scope().attr("_CalcRadiusOfGyration_version") =
RDKit::Descriptors::radiusOfGyrationVersion;
docString =
"";
python::def("CalcRadiusOfGyration", RDKit::Descriptors::radiusOfGyration,
(python::arg("mol"), python::arg("confId") = -1,
python::arg("useAtomicMasses")=true),
docString.c_str());
python::scope().attr("_CalcInertialShapeFactor_version") =
RDKit::Descriptors::inertialShapeFactorVersion;
docString =
"";
python::def("CalcInertialShapeFactor", RDKit::Descriptors::inertialShapeFactor,
(python::arg("mol"), python::arg("confId") = -1,
python::arg("useAtomicMasses")=true),
docString.c_str());
python::scope().attr("_CalcEccentricity_version") =
RDKit::Descriptors::eccentricityVersion;
docString =
"";
python::def("CalcEccentricity", RDKit::Descriptors::eccentricity,
(python::arg("mol"), python::arg("confId") = -1,
python::arg("useAtomicMasses")=true),
docString.c_str());
python::scope().attr("_CalcAsphericity_version") =
RDKit::Descriptors::asphericityVersion;
docString =
"";
python::def("CalcAsphericity", RDKit::Descriptors::asphericity,
(python::arg("mol"), python::arg("confId") = -1,
python::arg("useAtomicMasses")=true),
docString.c_str());
python::scope().attr("_CalcSpherocityIndex_version") =
RDKit::Descriptors::spherocityIndexVersion;
docString =
"";
python::def("CalcSpherocityIndex", RDKit::Descriptors::spherocityIndex,
(python::arg("mol"), python::arg("confId") = -1),
docString.c_str());
#endif
}

View File

@@ -0,0 +1,437 @@
//
// Copyright (C) 2016 Greg Landrum
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#ifdef _MSC_VER
// disable warnings about getenv in visual C++
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <iostream>
#include <fstream>
#include <RDGeneral/BoostStartInclude.h>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/lexical_cast.hpp>
#include <RDGeneral/BoostEndInclude.h>
#include <RDGeneral/Invariant.h>
#include <RDGeneral/RDLog.h>
#include <RDGeneral/utils.h>
#include <RDGeneral/StreamOps.h>
#include <GraphMol/RDKitBase.h>
#include <GraphMol/SmilesParse/SmilesParse.h>
#include <GraphMol/FileParsers/FileParsers.h>
#include <GraphMol/FileParsers/MolSupplier.h>
#include <GraphMol/Descriptors/MolDescriptors3D.h>
using namespace RDKit;
using namespace RDKit::Descriptors;
bool compare(const std::string &inm,double ref,double val,double tol=1e-3){
if(fabs(ref-val)>.001){
std::cerr<<"value mismatch: "<<inm<<" "<<ref<<" "<<val<<std::endl;
}
return fabs(ref-val)<tol;
}
void testPMI1(){
BOOST_LOG(rdErrorLog) << "-------------------------------------" << std::endl;
BOOST_LOG(rdErrorLog) << " Basic PMI tests." << std::endl;
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/PBF_egfr.sdf";
RDKit::SDMolSupplier reader(sdfName,true,false);
std::string fName = pathName+"/Code/GraphMol/Descriptors/test_data/PMI_egfr.out";
std::ifstream instrm(fName.c_str());
int nDone=0;
while(!reader.atEnd()){
RDKit::ROMol *m=reader.next();
TEST_ASSERT(m);
RDKit::ROMol mcpy(*m);
std::string nm;
m->getProp("_Name",nm);
std::string inm;
instrm>>inm;
TEST_ASSERT(inm==nm);
double val;
double pmi1_m,pmi2_m,pmi3_m,pmi1_nom,pmi2_nom,pmi3_nom;
instrm>>pmi1_m;
instrm>>pmi2_m;
instrm>>pmi3_m;
instrm>>pmi1_nom;
instrm>>pmi2_nom;
instrm>>pmi3_nom;
val = RDKit::Descriptors::PMI1(*m);
TEST_ASSERT(compare(inm,pmi1_m,val));
val = RDKit::Descriptors::PMI2(*m);
TEST_ASSERT(compare(inm,pmi2_m,val));
val = RDKit::Descriptors::PMI3(*m);
TEST_ASSERT(compare(inm,pmi3_m,val));
val = RDKit::Descriptors::PMI1(*m,-1,false);
TEST_ASSERT(compare(inm,pmi1_nom,val));
val = RDKit::Descriptors::PMI2(*m,-1,false);
TEST_ASSERT(compare(inm,pmi2_nom,val));
val = RDKit::Descriptors::PMI3(*m,-1,false);
TEST_ASSERT(compare(inm,pmi3_nom,val));
// now try doing it in the reverse order to make sure caching doesn't
// screw up.
val = RDKit::Descriptors::PMI1(mcpy,-1,false);
TEST_ASSERT(compare(inm,pmi1_nom,val));
val = RDKit::Descriptors::PMI2(mcpy,-1,false);
TEST_ASSERT(compare(inm,pmi2_nom,val));
val = RDKit::Descriptors::PMI3(mcpy,-1,false);
TEST_ASSERT(compare(inm,pmi3_nom,val));
val = RDKit::Descriptors::PMI1(mcpy);
TEST_ASSERT(compare(inm,pmi1_m,val));
val = RDKit::Descriptors::PMI2(mcpy);
TEST_ASSERT(compare(inm,pmi2_m,val));
val = RDKit::Descriptors::PMI3(mcpy);
TEST_ASSERT(compare(inm,pmi3_m,val));
delete m;
++nDone;
}
BOOST_LOG(rdErrorLog) << " done" << std::endl;
}
void testPMIEdges(){
BOOST_LOG(rdErrorLog) << "-------------------------------------" << std::endl;
BOOST_LOG(rdErrorLog) << " PMI edge cases." << std::endl;
{
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/linear.mol";
RDKit::ROMol *m=MolFileToMol(sdfName);
TEST_ASSERT(m);
double val;
val = RDKit::Descriptors::PMI1(*m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::PMI2(*m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::PMI3(*m);
TEST_ASSERT(val>=1e-4);
delete m;
}
{
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/linear_2atom.mol";
RDKit::ROMol *m=MolFileToMol(sdfName);
TEST_ASSERT(m);
double val;
val = RDKit::Descriptors::PMI1(*m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::PMI2(*m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::PMI3(*m);
TEST_ASSERT(val>=1e-4);
delete m;
}
{
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/planar.mol";
RDKit::ROMol *m=MolFileToMol(sdfName);
TEST_ASSERT(m);
double val;
val = RDKit::Descriptors::PMI1(*m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::PMI2(*m);
TEST_ASSERT(val>=1e-4);
val = RDKit::Descriptors::PMI3(*m);
TEST_ASSERT(val>=1e-4);
delete m;
}
{
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/planar_3atom.mol";
RDKit::ROMol *m=MolFileToMol(sdfName);
TEST_ASSERT(m);
double val;
val = RDKit::Descriptors::PMI1(*m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::PMI2(*m);
TEST_ASSERT(val>=1e-4);
val = RDKit::Descriptors::PMI3(*m);
TEST_ASSERT(val>=1e-4);
delete m;
}
{
RDKit::RWMol m;
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addConformer(new RDKit::Conformer(m.getNumAtoms()));
double val = RDKit::Descriptors::PMI1(m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::PMI2(m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::PMI3(m);
TEST_ASSERT(fabs(val)<1e-4);
}
BOOST_LOG(rdErrorLog) << " done" << std::endl;
}
void testNPR1(){
BOOST_LOG(rdErrorLog) << "-------------------------------------" << std::endl;
BOOST_LOG(rdErrorLog) << " Basic NPR tests." << std::endl;
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/PBF_egfr.sdf";
RDKit::SDMolSupplier reader(sdfName,true,false);
int nDone=0;
while(!reader.atEnd()){
RDKit::ROMol *m=reader.next();
TEST_ASSERT(m);
RDKit::ROMol mcpy(*m);
std::string nm;
m->getProp("_Name",nm);
double val;
double pmi1_m,pmi2_m,pmi3_m,pmi1_nom,pmi2_nom,pmi3_nom;
pmi1_m = RDKit::Descriptors::PMI1(*m);
pmi2_m = RDKit::Descriptors::PMI2(*m);
pmi3_m = RDKit::Descriptors::PMI3(*m);
pmi1_nom = RDKit::Descriptors::PMI1(*m,-1,false);
pmi2_nom = RDKit::Descriptors::PMI2(*m,-1,false);
pmi3_nom = RDKit::Descriptors::PMI3(*m,-1,false);
val = RDKit::Descriptors::NPR1(*m);
compare(nm,pmi1_m/pmi3_m,val);
val = RDKit::Descriptors::NPR2(*m);
compare(nm,pmi2_m/pmi3_m,val);
delete m;
++nDone;
}
BOOST_LOG(rdErrorLog) << " done" << std::endl;
}
void testNPREdges(){
BOOST_LOG(rdErrorLog) << "-------------------------------------" << std::endl;
BOOST_LOG(rdErrorLog) << " NPR edge cases." << std::endl;
{
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/linear.mol";
RDKit::ROMol *m=MolFileToMol(sdfName);
TEST_ASSERT(m);
double val;
val = RDKit::Descriptors::NPR1(*m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::NPR2(*m);
TEST_ASSERT(fabs(val)<1e-4);
delete m;
}
{
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/linear_2atom.mol";
RDKit::ROMol *m=MolFileToMol(sdfName);
TEST_ASSERT(m);
double val;
val = RDKit::Descriptors::NPR1(*m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::NPR2(*m);
TEST_ASSERT(fabs(val)<1e-4);
delete m;
}
{
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/planar.mol";
RDKit::ROMol *m=MolFileToMol(sdfName);
TEST_ASSERT(m);
double val;
val = RDKit::Descriptors::NPR1(*m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::NPR2(*m);
TEST_ASSERT(val>=1e-4);
delete m;
}
{
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/planar_3atom.mol";
RDKit::ROMol *m=MolFileToMol(sdfName);
TEST_ASSERT(m);
double val;
val = RDKit::Descriptors::NPR1(*m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::NPR2(*m);
TEST_ASSERT(val>=1e-4);
delete m;
}
{
RDKit::RWMol m;
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addConformer(new RDKit::Conformer(m.getNumAtoms()));
double val = RDKit::Descriptors::NPR1(m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::NPR2(m);
TEST_ASSERT(fabs(val)<1e-4);
}
BOOST_LOG(rdErrorLog) << " done" << std::endl;
}
void test3DEdges(){
BOOST_LOG(rdErrorLog) << "-------------------------------------" << std::endl;
BOOST_LOG(rdErrorLog) << " 3D descriptor edge cases." << std::endl;
{
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/linear.mol";
RDKit::ROMol *m=MolFileToMol(sdfName);
TEST_ASSERT(m);
double val;
val = RDKit::Descriptors::radiusOfGyration(*m);
TEST_ASSERT(fabs(val)<1e-2);
val = RDKit::Descriptors::inertialShapeFactor(*m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::eccentricity(*m);
TEST_ASSERT(fabs(1.0-val)<1e-4);
val = RDKit::Descriptors::asphericity(*m);
TEST_ASSERT(fabs(1.0-val)<1e-4);
val = RDKit::Descriptors::spherocityIndex(*m);
TEST_ASSERT(fabs(val)<1e-4);
delete m;
}
{
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/planar.mol";
RDKit::ROMol *m=MolFileToMol(sdfName);
TEST_ASSERT(m);
double val;
val = RDKit::Descriptors::radiusOfGyration(*m);
TEST_ASSERT(fabs(val)>1e-2);
val = RDKit::Descriptors::inertialShapeFactor(*m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::eccentricity(*m);
TEST_ASSERT(fabs(1.0-val)<1e-4);
val = RDKit::Descriptors::asphericity(*m);
TEST_ASSERT(fabs(0.5-val)<1e-4);
val = RDKit::Descriptors::spherocityIndex(*m);
TEST_ASSERT(fabs(val)<1e-4);
delete m;
}
{ // octahedron
RDKit::RWMol m;
m.addAtom(new RDKit::Atom(1));
m.addAtom(new RDKit::Atom(1));
m.addAtom(new RDKit::Atom(1));
m.addAtom(new RDKit::Atom(1));
m.addAtom(new RDKit::Atom(1));
m.addAtom(new RDKit::Atom(1));
m.addConformer(new RDKit::Conformer(m.getNumAtoms()));
m.getConformer().setAtomPos(0,RDGeom::Point3D(1,0,0));
m.getConformer().setAtomPos(1,RDGeom::Point3D(-1,0,0));
m.getConformer().setAtomPos(2,RDGeom::Point3D(0,1,0));
m.getConformer().setAtomPos(3,RDGeom::Point3D(0,-1,0));
m.getConformer().setAtomPos(4,RDGeom::Point3D(0,0,1));
m.getConformer().setAtomPos(5,RDGeom::Point3D(0,0,-1));
double val;
val = RDKit::Descriptors::radiusOfGyration(m);
TEST_ASSERT(fabs(val)>0.1);
val = RDKit::Descriptors::inertialShapeFactor(m);
TEST_ASSERT(fabs(val)>1);
val = RDKit::Descriptors::eccentricity(m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::asphericity(m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::spherocityIndex(m);
TEST_ASSERT(fabs(1.-val)<1e-4);
}
{
RDKit::RWMol m;
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addConformer(new RDKit::Conformer(m.getNumAtoms()));
double val;
val = RDKit::Descriptors::radiusOfGyration(m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::inertialShapeFactor(m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::eccentricity(m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::asphericity(m);
TEST_ASSERT(fabs(val)<1e-4);
val = RDKit::Descriptors::spherocityIndex(m);
TEST_ASSERT(fabs(val)<1e-4);
}
BOOST_LOG(rdErrorLog) << " done" << std::endl;
}
//-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
//
//-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
int main() {
RDLog::InitLogs();
test3DEdges();
testPMIEdges();
testNPREdges();
testPMI1();
testNPR1();
}

View File

@@ -0,0 +1,120 @@
//
// Copyright (C) 2012-2016 Greg Landrum
// @@ All Rights Reserved @@
//
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <RDGeneral/Invariant.h>
#include <GraphMol/RDKitBase.h>
#include <GraphMol/FileParsers/MolSupplier.h>
#include <GraphMol/FileParsers/FileParsers.h>
#include <RDGeneral/RDLog.h>
#include <vector>
#include <algorithm>
#include <fstream>
#include <GraphMol/Descriptors/PBF.h>
void test1(){
BOOST_LOG(rdErrorLog) << "-------------------------------------" << std::endl;
BOOST_LOG(rdErrorLog) << " Basic PBF tests." << std::endl;
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/PBF_egfr.sdf";
RDKit::SDMolSupplier reader(sdfName,true,false);
std::string fName = pathName+"/Code/GraphMol/Descriptors/test_data/PBF_egfr.out";
std::ifstream instrm(fName.c_str());
int nDone=0;
while(!reader.atEnd()){
RDKit::ROMol *m=reader.next();
TEST_ASSERT(m);
std::string nm;
m->getProp("_Name",nm);
double dpbf=RDKit::Descriptors::PBF(*m);
std::string inm;
double ref;
instrm>>inm;
instrm>>ref;
TEST_ASSERT(inm==nm);
if(fabs(ref-dpbf)>.001){
std::cerr<<"value mismatch: "<<inm<<" "<<ref<<" "<<dpbf<<std::endl;
}
TEST_ASSERT(fabs(ref-dpbf)<0.001);
delete m;
++nDone;
}
BOOST_LOG(rdErrorLog) << " done" << std::endl;
}
void testPBFEdges(){
BOOST_LOG(rdErrorLog) << "-------------------------------------" << std::endl;
BOOST_LOG(rdErrorLog) << " PBF edge cases." << std::endl;
{
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/linear.mol";
RDKit::ROMol *m=RDKit::MolFileToMol(sdfName);
TEST_ASSERT(m);
double dpbf=RDKit::Descriptors::PBF(*m);
TEST_ASSERT(dpbf<=1e-4);
delete m;
}
{
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/linear_2atom.mol";
RDKit::ROMol *m=RDKit::MolFileToMol(sdfName);
TEST_ASSERT(m);
double dpbf=RDKit::Descriptors::PBF(*m);
TEST_ASSERT(dpbf<=1e-4);
delete m;
}
{
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/planar.mol";
RDKit::ROMol *m=RDKit::MolFileToMol(sdfName);
TEST_ASSERT(m);
double dpbf=RDKit::Descriptors::PBF(*m);
TEST_ASSERT(dpbf<=1e-4);
delete m;
}
{
std::string pathName = getenv("RDBASE");
std::string sdfName = pathName+"/Code/GraphMol/Descriptors/test_data/planar_3atom.mol";
RDKit::ROMol *m=RDKit::MolFileToMol(sdfName);
TEST_ASSERT(m);
double dpbf=RDKit::Descriptors::PBF(*m);
TEST_ASSERT(dpbf<=1e-4);
delete m;
}
{
RDKit::RWMol m;
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addAtom(new RDKit::Atom(6));
m.addConformer(new RDKit::Conformer(m.getNumAtoms()));
double dpbf=RDKit::Descriptors::PBF(m);
TEST_ASSERT(dpbf<=1e-4);
}
BOOST_LOG(rdErrorLog) << " done" << std::endl;
}
int
main(int argc, char *argv[])
{
RDLog::InitLogs();
test1();
testPBFEdges();
}

View File

@@ -0,0 +1,365 @@
ZINC02640583 0.436514
ZINC03815185 0.384359
ZINC00020644 0.432705
ZINC03815359 0.420884
ZINC03815360 0.419304
ZINC03815361 0.495067
ZINC00007282 0.427628
ZINC03815304 0.461664
ZINC03815353 0.99046
ZINC00118570 0.409736
ZINC03815331 0.428284
ZINC00151213 0.444995
ZINC00151212 0.425337
ZINC03815388 0.397848
ZINC00104621 0.511603
ZINC03815229 0.454478
ZINC03815317 0.863404
ZINC03815247 0.433154
ZINC03815375 0.479847
ZINC03815227 0.366605
ZINC03815274 0.388936
ZINC00151214 0.445123
ZINC03815386 0.616104
ZINC00118581 0.436257
ZINC03815055 0.422886
ZINC03815319 0.861062
ZINC03815146 0.428445
ZINC03815314 0.765373
ZINC03815398 0.904978
ZINC00104782 0.543704
ZINC03815197 0.457593
ZINC03815196 0.385496
ZINC03815276 0.283628
ZINC03815251 0.411828
ZINC03815264 0.373872
ZINC03815202 0.453839
ZINC03815203 0.367256
ZINC03815236 0.431219
ZINC03815238 0.902386
ZINC03815259 0.827859
ZINC03815280 0.416447
ZINC03815242 0.367709
ZINC03813425 0.873214
ZINC03815036 0.479748
ZINC03815410 0.921558
ZINC03815046 0.41762
ZINC03815035 0.80646
ZINC03815034 0.429925
ZINC03815282 0.431068
ZINC03815281 0.864389
ZINC03813430 0.900448
ZINC03813429 0.85502
ZINC03815072 0.429032
ZINC03815374 0.485864
ZINC03815124 0.932605
ZINC03815338 0.424536
ZINC03815176 0.894896
ZINC03815111 0.402992
ZINC03815343 0.446446
ZINC03815100 0.382359
ZINC03815101 0.381455
ZINC00020362 0.391509
ZINC03815232 0.45789
ZINC03815097 0.86145
ZINC03815163 0.437436
ZINC03815162 0.428272
ZINC03815029 0.501985
ZINC03815037 0.82073
ZINC03815038 0.439139
ZINC03815411 0.403192
ZINC03815159 0.437572
ZINC03815042 0.952196
ZINC03815286 0.469829
ZINC03815284 0.809881
ZINC03815144 0.407456
ZINC03815183 0.437115
ZINC03813424 0.922957
ZINC03815137 0.384613
ZINC02391776 0.407277
ZINC03815060 0.69903
ZINC03815140 0.447364
ZINC03815138 0.40426
ZINC03815143 0.462323
ZINC03815070 0.411479
ZINC03815320 0.477848
ZINC03815069 0.406012
ZINC03815332 0.443138
ZINC03815248 0.47224
ZINC03815373 0.863014
ZINC03815118 0.435033
ZINC03815117 0.485806
ZINC03815121 0.911104
ZINC03815335 0.476911
ZINC03815266 0.47296
ZINC03815125 0.867099
ZINC03815328 0.47636
ZINC03815136 0.421724
ZINC03815141 0.467572
ZINC03815033 0.928804
ZINC00116727 0.418014
ZINC03815406 0.424871
ZINC00020363 0.434263
ZINC02391785 0.423726
ZINC03815357 0.425375
ZINC03815080 0.411394
ZINC03813428 0.838895
ZINC03815079 0.402561
ZINC00118594 0.535412
ZINC03815027 0.501603
ZINC03813434 1.03211
ZINC03815393 0.416756
ZINC03815187 0.471209
ZINC03815190 0.449678
ZINC00600292 0.448708
ZINC03815041 0.782533
ZINC03815212 0.441078
ZINC03815031 0.463054
ZINC03815045 0.778185
ZINC03815292 0.545086
ZINC00601499 0.43387
ZINC03815206 0.618994
ZINC01386818 0.42978
ZINC00009851 0.418371
ZINC03815362 0.562948
ZINC03815129 0.518257
ZINC03815235 0.404882
ZINC03815075 0.450396
ZINC03813431 0.929903
ZINC01386782 0.425327
ZINC03815283 0.40785
ZINC03815250 0.427104
ZINC00116937 0.440178
ZINC03815334 0.743221
ZINC03815199 0.446769
ZINC03815088 0.625645
ZINC03815348 0.42855
ZINC03815258 0.424417
ZINC03815102 0.884444
ZINC03815043 1.14772
ZINC03815032 0.457907
ZINC03815050 0.947045
ZINC03815273 0.958523
ZINC03815119 0.763692
ZINC03815189 0.382962
ZINC03815278 0.47345
ZINC03815290 0.969988
ZINC00016978 0.446357
ZINC03815316 0.449029
ZINC03815384 0.769305
ZINC03815228 0.539634
ZINC03815397 0.751452
ZINC03815077 0.784858
ZINC03815300 0.773386
ZINC02572485 0.465491
ZINC03815298 0.77127
ZINC03815059 0.857721
ZINC03815201 0.937452
ZINC03815066 0.593059
ZINC04617768 0.84076
ZINC03815198 1.01368
ZINC04617774 0.826162
ZINC03815064 0.79792
ZINC03815087 1.0637
ZINC03815040 1.02664
ZINC03815049 0.848555
ZINC03815243 0.873546
ZINC03815026 0.484773
ZINC03815051 0.790388
ZINC03815044 0.572396
ZINC03815272 0.747981
ZINC03815172 1.22403
ZINC03815191 0.959669
ZINC03815063 0.991698
ZINC03815387 0.778205
ZINC03815218 0.438363
ZINC03815090 1.09107
ZINC04617771 1.05929
ZINC03815333 0.696153
ZINC03815237 1.05009
ZINC04617779 0.823026
ZINC03815175 0.753829
ZINC03815096 0.800152
ZINC03815358 0.782897
ZINC03815126 0.969415
ZINC03815404 0.76661
ZINC03815401 0.837284
ZINC03815108 1.08859
ZINC03815154 1.03932
ZINC04617776 1.03421
ZINC03815165 0.842847
ZINC03815352 0.80135
ZINC03815173 0.815569
ZINC03815367 0.508814
ZINC00109589 0.492766
ZINC03815364 0.656231
ZINC03815303 0.486832
ZINC03815312 0.806352
ZINC03815256 0.486981
ZINC03815253 0.476795
ZINC03815365 0.524797
ZINC01386812 0.482632
ZINC00020368 0.461225
ZINC03815297 0.758306
ZINC03815342 0.583186
ZINC03815083 0.71993
ZINC03815293 0.460686
ZINC03815310 0.44441
ZINC03815326 0.46511
ZINC03815341 0.49061
ZINC03815394 0.55288
ZINC03815277 0.479513
ZINC03815156 0.356322
ZINC03815244 0.491667
ZINC00020645 0.484439
ZINC03815402 0.549341
ZINC03815336 0.564009
ZINC00023489 0.474263
ZINC00007342 0.462184
ZINC03815231 0.450524
ZINC03815295 0.445871
ZINC03815257 0.740963
ZINC03815345 0.818226
ZINC03815368 1.02146
ZINC03815234 0.368238
ZINC03815200 0.444652
ZINC00006271 0.391485
ZINC04617767 0.396024
ZINC03815028 0.406226
ZINC03815058 0.401587
ZINC03815241 0.402138
ZINC03815054 0.409559
ZINC03815030 0.405508
ZINC02391775 0.414729
ZINC03815052 0.415147
ZINC03815057 0.420655
ZINC03815073 0.408267
ZINC03815249 0.459572
ZINC03815152 0.493747
ZINC03815116 0.753206
ZINC04617775 0.656041
ZINC03815233 0.616674
ZINC04617795 0.697753
ZINC03815239 0.787724
ZINC03815188 0.628862
ZINC03815095 0.79212
ZINC03815103 0.610361
ZINC03815209 0.787561
ZINC03815306 0.679135
ZINC03815208 0.875221
ZINC03815067 0.744754
ZINC03815382 0.351139
ZINC03815179 0.325824
ZINC03815112 0.427827
ZINC03815061 0.344801
ZINC03815048 0.35833
ZINC03815120 0.354945
ZINC03815084 0.348226
ZINC03815255 0.326108
ZINC03815186 0.429444
ZINC03815245 0.441563
ZINC03815322 0.397919
ZINC03815301 0.449051
ZINC00327021 0.435949
ZINC03815356 0.654827
ZINC03815340 0.656272
ZINC04617812 0.654834
ZINC04617811 0.656272
ZINC03815093 0.499601
ZINC03815222 0.518169
ZINC00006798 0.576891
ZINC01609260 0.622042
ZINC03815377 0.640001
ZINC03815366 0.792835
ZINC03815351 0.780097
ZINC03815376 0.60972
ZINC01609268 0.660758
ZINC03815391 0.871951
ZINC03815323 0.928252
ZINC03815390 0.825757
ZINC03815324 0.821117
ZINC03815025 0.374554
ZINC03815106 0.380251
ZINC04617810 0.451164
ZINC04617809 0.451167
ZINC03815339 0.606563
ZINC04617808 0.606556
ZINC04617792 0.625439
ZINC04617793 0.460149
ZINC03815184 0.46015
ZINC04617794 0.625437
ZINC04617801 0.670945
ZINC04617802 0.52435
ZINC04617803 0.528488
ZINC03815267 0.689135
ZINC04617798 0.626909
ZINC03815217 0.687552
ZINC04617797 0.654078
ZINC04617799 0.665845
ZINC03815395 0.861297
ZINC00021592 0.568816
ZINC03815265 0.50695
ZINC00839396 0.542692
ZINC03815082 0.545021
ZINC03815194 0.703294
ZINC00839389 0.594219
ZINC03815150 0.53445
ZINC03815169 0.573408
ZINC00839395 0.579083
ZINC03815219 0.559049
ZINC04617814 1.10883
ZINC03815409 1.10804
ZINC03815213 0.604624
ZINC03815151 0.636088
ZINC03815230 0.662558
ZINC00018522 0.508912
ZINC03815160 0.664231
ZINC03815171 0.656096
ZINC03815161 0.69972
ZINC03815158 0.758103
ZINC03815305 0.843022
ZINC03815157 0.784753
ZINC03815396 0.573847
ZINC03815371 0.758241
ZINC03815389 0.786044
ZINC03815403 0.68498
ZINC00006094 0.80032
ZINC00600430 0.808292
ZINC03815123 0.578466
ZINC03815071 0.974199
ZINC03815047 0.534199
ZINC03815094 0.920094
ZINC03815098 1.10157
ZINC03815164 0.914883
ZINC03815076 0.807164
ZINC03815354 0.654033
ZINC00838734 0.65527
ZINC00601820 0.629358
ZINC03815288 0.67517
ZINC03815350 0.693131
ZINC03815309 0.668553
ZINC03815223 0.726531
ZINC02047503 0.734933
ZINC03815370 0.677337
ZINC03815299 0.753773
ZINC03815128 1.13384
ZINC03815114 0.686395
ZINC03815099 1.07295
ZINC03815074 0.597016
ZINC03815065 1.00857
ZINC03815091 0.95683
ZINC03815279 0.721165
ZINC03815062 0.844225
ZINC03815132 0.842494
ZINC03815113 0.524779
ZINC03815105 0.988154
ZINC00837641 0.970412
ZINC03815109 1.01694
ZINC03815122 0.536588
ZINC03815147 0.953271
ZINC03815178 1.01701
ZINC03815155 1.05261
ZINC04617805 0.6801
ZINC04617806 0.648888
ZINC04617807 0.722656
ZINC03815325 0.727043

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,365 @@
ZINC02640583 3.0801 29.7186 611.2271 0.2847 2.6912 9.5101
ZINC03815185 3.5346 27.0039 504.3305 0.2063 2.4595 10.6998
ZINC00020644 2.6425 26.9142 503.4538 0.3094 3.1402 11.4473
ZINC03815359 1.8104 25.1140 127.0568 0.2941 3.0868 11.3061
ZINC03815360 1.0117 22.1038 144.9868 0.2901 3.0698 11.3354
ZINC03815361 1.6029 25.6052 108.9653 0.3842 3.4720 12.5140
ZINC00007282 2.4846 27.5291 203.4813 0.3024 3.1157 11.3806
ZINC03815304 2.0897 26.3651 127.5708 0.3342 3.1706 12.1041
ZINC03815353 22.4564 31.4503 114.5407 1.5892 3.8362 6.5291
ZINC00118570 1.3943 18.6414 97.7103 0.2724 2.5262 10.8296
ZINC03815331 1.5327 19.4748 96.5107 0.2958 2.3868 11.1637
ZINC00151213 3.5669 25.5232 465.3378 0.3141 2.6207 10.9890
ZINC00151212 2.7213 20.9339 122.5810 0.2925 2.5390 10.8807
ZINC03815388 1.4185 25.7575 101.6433 0.2919 3.0555 11.2252
ZINC00104621 2.1731 20.0218 108.5350 0.3994 2.8232 12.3101
ZINC03815229 3.7147 25.0157 530.7980 0.3149 2.3985 10.8691
ZINC03815317 4.7456 27.7210 86.8434 1.0672 2.9782 9.0980
ZINC03815247 3.0364 25.4102 475.4405 0.2810 2.7007 10.2004
ZINC03815375 4.3305 25.9187 462.6263 0.3794 2.5321 10.4342
ZINC03815227 2.4708 27.4159 506.8760 0.1898 2.7792 10.9349
ZINC03815274 1.3270 19.2506 115.7583 0.2608 2.4849 12.7037
ZINC00151214 3.1339 23.2410 736.2225 0.3134 2.6437 11.0079
ZINC03815386 11.3526 21.0966 450.7802 1.0822 1.8197 11.0230
ZINC00118581 3.5709 24.8304 192.6177 0.3042 2.5827 10.9386
ZINC03815055 3.6817 22.4606 836.7797 0.3022 2.5782 12.9045
ZINC03815319 6.8681 21.5220 786.1869 1.1329 2.5498 10.1492
ZINC03815146 4.2130 24.4087 535.5866 0.3000 2.5448 12.1103
ZINC03815314 3.4217 57.8741 195.3103 0.8959 2.4918 10.6726
ZINC03815398 9.8121 19.1927 130.6622 1.1623 2.3410 10.5614
ZINC00104782 2.8524 20.2475 126.8371 0.4116 2.5932 14.0443
ZINC03815197 3.5442 33.3375 596.9038 0.3190 2.3997 10.9896
ZINC03815196 0.9500 31.5306 104.8934 0.2136 3.7684 12.1287
ZINC03815276 0.8812 28.6923 488.0190 0.1132 3.2365 10.4524
ZINC03815251 1.2764 31.0311 111.9996 0.3030 3.2794 13.0827
ZINC03815264 3.1097 80.2402 538.0409 0.1941 2.9195 10.2118
ZINC03815202 1.5646 29.5527 108.0422 0.3081 3.6911 11.4435
ZINC03815203 3.2105 80.9649 537.2133 0.1955 2.9232 10.9743
ZINC03815236 7.4008 32.6996 640.1130 0.2871 2.8416 10.2324
ZINC03815238 5.9469 19.6415 123.0272 1.2927 2.1975 12.8994
ZINC03815259 6.5526 19.6214 134.2680 1.0983 2.2664 12.1194
ZINC03815280 1.2901 20.9120 134.0537 0.3059 2.6942 14.3518
ZINC03815242 2.9597 42.3757 516.1766 0.1932 2.8317 10.9630
ZINC03813425 18.7624 24.8798 430.3084 1.2052 2.6203 10.7186
ZINC03815036 6.3566 26.1594 500.9108 0.4079 2.9438 11.1178
ZINC03815410 9.5123 34.3412 435.7890 1.3063 2.2656 10.6805
ZINC03815046 3.4430 27.7518 232.1838 0.2926 2.5460 12.8244
ZINC03815035 7.1132 31.7527 473.7552 1.0026 3.3258 8.9279
ZINC03815034 5.1396 26.0410 505.2368 0.3417 3.1100 11.4212
ZINC03815282 4.9038 26.9602 534.2950 0.2822 2.7599 10.2037
ZINC03815281 8.0616 23.6308 192.6667 1.1237 2.5178 10.1027
ZINC03813430 4.2604 16.9351 664.1676 1.1521 2.3330 10.7735
ZINC03813429 7.1823 23.3050 471.7129 1.1109 2.5517 10.1191
ZINC03815072 3.5378 28.6953 572.3357 0.3057 2.5823 12.8792
ZINC03815374 5.6247 25.1217 544.0283 0.3872 2.5267 10.5518
ZINC03815124 6.5917 25.7393 101.8343 1.2222 2.8406 10.6321
ZINC03815338 1.4839 50.9005 154.0863 0.2677 3.1516 11.2912
ZINC03815176 6.8769 21.2675 105.6047 1.1141 2.6949 11.6898
ZINC03815111 2.7953 20.3991 144.1591 0.2805 2.4905 12.7653
ZINC03815343 3.5817 27.6171 502.3218 0.3182 2.6709 12.0961
ZINC03815100 2.7732 35.8476 511.2191 0.2145 3.4303 10.4710
ZINC03815101 3.1339 33.8291 519.3260 0.2207 3.3136 10.7558
ZINC00020362 2.1102 27.7997 558.8167 0.2278 3.7932 12.7160
ZINC03815232 3.5758 35.1689 612.7364 0.3558 2.8298 14.2766
ZINC03815097 5.5374 22.8310 132.5972 1.2396 2.6567 14.3703
ZINC03815163 3.5541 36.5281 611.3909 0.3424 2.7223 14.0004
ZINC03815162 4.7922 23.3951 580.5819 0.3342 2.6870 15.2283
ZINC03815029 7.8113 25.9661 544.6238 0.4435 3.0929 13.3585
ZINC03815037 10.2974 39.3217 474.5641 1.0851 2.7762 12.9196
ZINC03815038 5.5841 25.5238 572.6742 0.3433 2.8106 12.2288
ZINC03815411 2.5146 31.1824 499.8055 0.2824 4.0495 10.0688
ZINC03815159 7.0094 26.0184 718.8113 0.3583 3.0882 11.6707
ZINC03815042 16.4190 29.2867 186.3169 1.3125 2.9108 11.2554
ZINC03815286 3.4618 29.1038 553.9148 0.3440 2.4411 14.7767
ZINC03815284 4.6689 22.7489 137.4907 0.9164 2.5940 13.2093
ZINC03815144 3.4415 42.5563 497.5603 0.2752 4.3367 10.1968
ZINC03815183 5.6638 26.5895 558.9469 0.3478 3.3013 13.3264
ZINC03813424 12.4792 42.1919 374.8405 1.2435 3.3846 10.0882
ZINC03815137 1.6807 27.5790 570.0587 0.2084 3.6576 12.5302
ZINC02391776 5.0387 25.2263 557.8216 0.2980 2.9663 12.9163
ZINC03815060 2.5896 30.7132 115.0409 0.7579 3.8403 12.3040
ZINC03815140 6.1703 26.1022 551.1329 0.3726 3.4001 13.2952
ZINC03815138 2.8040 30.2756 543.3491 0.2774 4.0754 10.2394
ZINC03815143 1.4857 34.7568 112.7672 0.3168 4.4257 12.9706
ZINC03815070 3.3029 41.3331 528.8407 0.2611 3.6458 12.6528
ZINC03815320 4.9713 24.7335 576.1407 0.3773 2.2603 14.9528
ZINC03815069 2.9482 43.3994 516.7938 0.2430 3.9372 12.2239
ZINC03815332 5.0034 23.5154 587.2414 0.3513 2.7293 14.5762
ZINC03815248 5.7710 23.7532 571.6996 0.3932 2.4591 15.2311
ZINC03815373 4.4864 27.7421 129.7568 1.0674 2.7498 12.2562
ZINC03815118 4.5082 26.3356 569.7949 0.3130 3.3222 13.0392
ZINC03815117 7.1946 26.3622 553.6425 0.4123 3.0062 13.3551
ZINC03815121 7.0742 26.7588 112.9301 1.1551 3.1477 12.6333
ZINC03815335 3.7328 33.6183 589.9957 0.3539 2.6613 12.4590
ZINC03815266 6.3488 28.1951 571.8773 0.4569 3.8583 12.9199
ZINC03815125 11.1157 40.7042 499.0718 1.1156 3.0374 13.1889
ZINC03815328 5.5587 23.9645 613.2192 0.3986 2.5157 16.8191
ZINC03815136 4.8401 25.2081 612.8020 0.3076 2.8507 15.0085
ZINC03815141 1.5488 39.2165 109.6781 0.3713 4.8364 12.4659
ZINC03815033 11.2350 37.9837 510.7523 1.3083 2.5817 13.9836
ZINC00116727 1.3089 30.5193 133.0445 0.3622 3.7455 13.8781
ZINC03815406 5.4578 24.0424 653.6700 0.3084 2.5772 13.0944
ZINC00020363 3.4623 46.7596 502.0294 0.3141 4.3844 11.9000
ZINC02391785 5.0105 25.3307 604.2828 0.3152 2.8201 15.3885
ZINC03815357 5.0139 22.5943 1049.6983 0.3083 2.5978 13.1133
ZINC03815080 2.6300 30.1491 577.3952 0.2791 3.9216 12.4809
ZINC03813428 6.5965 30.4845 139.8075 1.0080 2.8166 10.4313
ZINC03815079 1.8462 29.7959 581.5337 0.2676 4.2337 12.0581
ZINC00118594 6.0893 23.8840 178.3182 0.4557 2.8277 12.3621
ZINC03815027 8.0274 28.0719 565.2599 0.4964 3.5218 13.1176
ZINC03813434 14.4810 23.7280 520.9077 1.5172 3.3488 9.8543
ZINC03815393 4.6892 22.8388 288.7785 0.2980 2.5462 13.0388
ZINC03815187 5.0253 23.0719 625.5046 0.4233 2.5830 16.8409
ZINC03815190 5.3210 22.3494 647.8644 0.3506 2.5408 18.4990
ZINC00600292 6.4530 28.4804 625.4717 0.4100 3.8000 14.0629
ZINC03815041 11.8605 73.9987 322.5237 0.9413 5.2055 10.3637
ZINC03815212 8.8923 33.1139 747.5921 0.3780 3.2331 11.6714
ZINC03815031 5.1866 40.5240 627.7386 0.4369 3.7199 14.1492
ZINC03815045 10.1069 50.4763 569.8905 1.0494 2.8241 15.9884
ZINC03815292 5.7751 23.9366 645.6246 0.6013 2.6564 16.3881
ZINC00601499 3.4471 46.5413 690.0197 0.3127 2.5625 18.7055
ZINC03815206 17.7468 24.9949 232.9904 0.9076 3.3410 14.0250
ZINC01386818 3.1049 29.6024 167.4622 0.3824 3.7508 13.9432
ZINC00009851 1.2140 29.3054 169.1254 0.3507 3.6563 15.1321
ZINC03815362 6.8357 26.1451 177.2097 0.5087 3.0831 12.8835
ZINC03815129 5.8055 26.8880 198.6478 0.4353 2.8540 14.2617
ZINC03815235 5.1047 22.8230 707.2976 0.2965 2.5575 18.5659
ZINC03815075 6.0943 25.9850 1035.0296 0.4113 3.8149 14.0796
ZINC03813431 7.7723 21.4937 161.0004 1.2183 2.3987 10.3999
ZINC01386782 1.0718 24.6132 814.5218 0.3754 3.7305 14.2649
ZINC03815283 1.8783 68.5815 216.0656 0.2658 4.0103 13.4086
ZINC03815250 4.7524 50.9325 598.4512 0.3356 3.1403 13.0025
ZINC00116937 5.2109 29.9543 257.2815 0.3972 3.7772 14.0068
ZINC03815334 5.1741 42.2025 563.2728 0.8533 3.9754 8.9349
ZINC03815199 5.1639 49.0140 641.8840 0.3789 2.9752 14.9801
ZINC03815088 3.5546 42.4396 183.6829 0.6418 4.1454 12.4633
ZINC03815348 5.1727 48.2280 621.3441 0.3956 4.8418 13.3696
ZINC03815258 7.0133 31.7568 657.1921 0.3380 2.9732 15.4485
ZINC03815102 8.9388 63.4228 538.8212 1.1188 2.7663 13.7083
ZINC03815043 25.0952 50.2335 389.0591 1.7972 4.1328 10.0899
ZINC03815032 7.6033 95.9321 772.3180 0.4284 3.7990 14.4211
ZINC03815050 14.9990 20.7526 632.7411 1.2799 2.6671 12.5946
ZINC03815273 27.5889 39.7376 138.8623 1.6989 4.0846 9.0136
ZINC03815119 10.1368 58.0929 576.5039 0.9952 3.0750 17.2075
ZINC03815189 5.1577 42.6487 638.8627 0.2955 5.6578 13.0756
ZINC03815278 8.5414 268.3438 589.2431 0.4625 3.8724 14.2194
ZINC03815290 28.9735 40.0839 365.6048 1.7689 4.0755 9.0242
ZINC00016978 5.0420 39.1153 270.7927 0.4096 3.7759 14.0965
ZINC03815316 1.3327 28.0887 188.7900 0.3841 3.4433 18.7025
ZINC03815384 5.1845 51.2045 128.9776 1.0030 4.5295 10.3356
ZINC03815228 3.2494 90.6087 576.7578 0.4820 4.3946 20.6088
ZINC03815397 5.0651 49.9130 114.5828 0.9746 4.3531 11.9137
ZINC03815077 10.4934 65.3349 661.0210 1.0205 3.0973 19.9972
ZINC03815300 5.0890 46.7589 586.3476 1.0130 4.5230 10.5636
ZINC02572485 6.8628 33.4591 692.4366 0.4412 4.9258 16.5024
ZINC03815298 5.3244 51.4114 216.6748 1.0067 4.5250 10.4633
ZINC03815059 10.1878 32.0558 549.1714 1.1216 3.3850 11.1458
ZINC03815201 11.7720 48.0025 643.7280 1.3005 2.7187 15.3792
ZINC03815066 3.4766 30.9659 641.1929 0.6743 3.9489 13.4434
ZINC04617768 8.6760 67.9287 621.7433 1.0340 5.3267 13.1296
ZINC03815198 11.6066 67.4490 459.0621 1.4671 3.4840 13.8034
ZINC04617774 12.6494 61.1252 658.0457 1.1400 3.2862 19.2287
ZINC03815064 10.1283 79.2554 624.6928 1.0474 3.1725 17.0695
ZINC03815087 18.9520 72.0885 420.1266 1.5698 4.4108 15.5795
ZINC03815040 17.3314 32.5240 707.5437 1.5183 2.7986 16.1127
ZINC03815049 18.1326 59.2002 640.6690 1.1542 4.0374 14.8740
ZINC03815243 10.1384 46.9636 660.6019 1.2224 2.4310 21.7915
ZINC03815026 8.4057 32.9998 686.1989 0.4840 4.8661 16.4617
ZINC03815051 10.2879 80.4456 716.7764 1.0402 3.2461 20.1464
ZINC03815044 6.9659 28.9251 226.2914 0.5690 3.7689 15.8035
ZINC03815272 5.5967 39.9321 171.3677 0.8647 4.9454 16.4149
ZINC03815172 26.7937 40.6152 336.6267 2.1750 4.1399 8.2329
ZINC03815191 10.0633 48.2445 670.5817 1.3106 2.7416 17.9523
ZINC03815063 10.9189 39.6704 743.9648 1.3868 2.4263 17.7814
ZINC03815387 5.6889 50.9814 201.3199 0.9651 4.3649 14.5884
ZINC03815218 7.0820 35.9712 733.3688 0.3306 2.8309 18.3261
ZINC03815090 19.7839 77.6511 467.7188 1.6859 4.4004 18.4313
ZINC04617771 17.1171 48.4474 625.1706 1.6276 4.2819 12.2556
ZINC03815333 4.1446 32.7890 199.0960 0.7959 4.1617 18.4942
ZINC03815237 10.6361 33.4368 685.4242 1.5639 2.5381 19.1085
ZINC04617779 14.4174 62.2481 649.4801 1.1278 3.6075 18.2912
ZINC03815175 10.1310 68.7005 706.1378 0.9809 3.1832 26.9274
ZINC03815096 10.9179 98.1941 784.2749 1.0547 3.1537 19.5993
ZINC03815358 9.4563 51.2077 223.5663 1.0307 4.5086 10.5775
ZINC03815126 12.6741 46.6525 580.5334 1.3896 4.8042 11.1996
ZINC03815404 6.2636 48.5285 160.8552 1.0206 4.3249 12.1151
ZINC03815401 6.0202 49.0115 138.2635 1.2090 3.9598 15.6957
ZINC03815108 19.7928 89.4520 510.4963 1.6559 4.4956 22.1028
ZINC03815154 8.5515 50.9919 220.2240 1.4478 5.3911 23.8441
ZINC04617776 16.8569 73.4008 500.5637 1.5173 4.2482 17.6645
ZINC03815165 9.8842 80.4098 757.5846 1.1402 3.1925 30.8502
ZINC03815352 6.1882 37.5056 202.4066 1.0123 4.9215 17.9755
ZINC03815173 9.9671 84.1533 844.1115 1.1300 3.1735 35.6162
ZINC03815367 3.7204 20.8477 115.6583 0.8692 2.5065 11.7555
ZINC00109589 3.7365 20.3118 117.7157 0.8414 2.5224 11.6897
ZINC03815364 2.1082 25.2357 129.6789 0.7184 2.9211 13.3238
ZINC03815303 3.3197 30.2207 143.0733 0.7905 3.5294 14.0423
ZINC03815312 4.6663 26.2188 128.5059 0.9534 2.9945 12.6011
ZINC03815256 3.3196 40.1055 117.5422 0.7905 4.1353 12.5742
ZINC03815253 3.1300 39.9078 128.2590 0.7683 4.2580 11.2027
ZINC03815365 2.7586 33.1221 146.1594 0.6777 2.8993 15.6981
ZINC01386812 2.9878 38.1877 139.4571 0.7502 3.8600 14.2523
ZINC00020368 3.0025 38.8146 167.1622 0.7476 3.4624 18.1227
ZINC03815297 5.0136 38.7230 147.4924 1.0990 3.9138 15.2838
ZINC03815342 7.9308 34.9951 296.0252 0.5576 3.9477 14.9707
ZINC03815083 4.8329 30.8296 121.1423 0.8896 3.1801 12.6484
ZINC03815293 3.8447 26.2998 200.3378 0.3545 2.4555 10.5381
ZINC03815310 3.6734 22.8856 248.1496 0.3463 2.3153 12.6938
ZINC03815326 1.1329 32.6789 102.4499 0.3862 3.5898 11.7287
ZINC03815341 1.6202 31.8066 125.2812 0.4027 3.6021 12.3618
ZINC03815394 1.8097 35.1363 110.9254 0.4926 4.0723 12.8623
ZINC03815277 1.0882 31.5182 121.3087 0.3962 3.4607 14.8127
ZINC03815156 3.1987 41.4774 210.3355 0.2294 3.7454 11.7341
ZINC03815244 3.7273 40.3201 536.3376 0.4251 3.7097 11.8245
ZINC00020645 3.3757 41.4557 207.2809 0.4139 3.6656 11.7980
ZINC03815402 2.1971 30.1382 140.3313 0.4788 3.2836 15.9760
ZINC03815336 5.3912 29.9273 190.4203 0.5290 3.4361 14.0346
ZINC00023489 5.0716 26.6857 239.7284 0.3568 2.2470 12.6165
ZINC00007342 4.9491 26.1897 241.2471 0.3523 2.4375 12.3370
ZINC03815231 5.2649 29.1528 244.6185 0.4081 3.4741 12.8216
ZINC03815295 5.3535 32.9404 235.2480 0.4300 4.6180 11.7766
ZINC03815257 11.4317 65.1123 211.5339 0.9100 8.0938 10.5132
ZINC03815345 43.7078 55.8307 111.9607 1.2444 4.8666 13.3694
ZINC03815368 9.1237 56.8264 111.3380 1.9022 6.1794 11.3024
ZINC03815234 4.6754 37.1159 725.9089 0.2029 2.3887 13.7775
ZINC03815200 5.8322 24.3840 609.1183 0.3530 2.9162 13.2483
ZINC00006271 3.5197 39.3555 588.1213 0.2736 3.2072 13.3058
ZINC04617767 3.5211 40.6218 591.2611 0.2690 2.9648 13.3686
ZINC03815028 3.5631 39.7689 597.4111 0.2874 3.1899 12.7811
ZINC03815058 3.5631 41.2116 594.9623 0.2847 3.0907 12.6742
ZINC03815241 6.9353 29.2591 686.9333 0.2770 2.9295 13.1268
ZINC03815054 3.6324 40.5229 600.5043 0.2943 2.9800 12.9320
ZINC03815030 3.9729 44.3145 593.5970 0.3302 3.9805 12.7784
ZINC02391775 3.4971 40.5637 632.3835 0.2946 2.7359 16.0586
ZINC03815052 3.5312 45.7016 623.3138 0.3145 3.3649 15.6107
ZINC03815057 3.5137 41.2529 635.6484 0.3084 2.8509 15.5605
ZINC03815073 3.4769 39.5957 629.0278 0.2988 2.9828 15.7822
ZINC03815249 4.4642 37.4292 786.9165 0.3491 2.8892 16.8465
ZINC03815152 6.3754 50.1263 773.4424 0.4246 2.8779 17.6617
ZINC03815116 10.2732 57.1923 592.9763 0.9765 5.3867 12.6602
ZINC04617775 8.5118 45.8693 837.5017 0.7471 2.5394 22.1642
ZINC03815233 4.1159 43.5508 866.3574 0.6990 2.2832 26.6272
ZINC04617795 11.2368 44.3426 830.5891 0.7992 2.4988 21.7562
ZINC03815239 9.7538 38.9849 816.7974 0.9275 2.6764 23.2574
ZINC03815188 4.9047 41.3271 861.0376 0.5784 2.6374 21.9216
ZINC03815095 11.5909 72.9028 595.7968 1.0433 5.9156 14.3936
ZINC03815103 5.7037 41.2345 859.4428 0.6008 2.6113 22.3030
ZINC03815209 10.0250 39.0470 820.4473 0.9199 2.4281 23.8348
ZINC03815306 3.6654 73.6123 917.5873 0.6740 2.4860 25.1269
ZINC03815208 15.9182 38.0292 857.6401 1.1585 2.9640 24.5676
ZINC03815067 9.3763 94.3488 643.0497 0.9700 5.2165 14.5574
ZINC03815382 2.6787 27.9037 266.2927 0.1833 2.4184 15.9431
ZINC03815179 0.8838 25.7209 154.1975 0.1649 2.4712 18.1955
ZINC03815112 1.6196 26.7291 166.7907 0.2727 2.8606 20.0135
ZINC03815061 3.3094 26.2862 694.8298 0.1908 2.7148 18.3053
ZINC03815048 3.6935 36.4904 700.7639 0.2021 2.5644 18.3870
ZINC03815120 3.3962 42.0325 655.2896 0.2210 3.2213 16.3673
ZINC03815084 3.8778 39.7831 760.9846 0.1968 2.7747 18.3280
ZINC03815255 0.8447 26.5099 206.3294 0.1670 2.4985 18.4192
ZINC03815186 1.6331 26.8434 221.0006 0.2767 2.8771 20.2495
ZINC03815245 5.4097 31.7544 254.4987 0.3219 2.8574 20.0847
ZINC03815322 3.0956 25.9268 596.5974 0.2548 2.5420 13.8272
ZINC03815301 3.0173 29.8481 147.7305 0.7671 2.9174 16.5918
ZINC00327021 3.2051 26.8219 144.7914 0.7453 3.0347 15.2074
ZINC03815356 3.5888 31.5972 143.5607 0.8376 3.3426 15.6307
ZINC03815340 3.7911 28.6080 139.1194 0.8464 3.4364 14.3505
ZINC04617812 3.5889 31.5977 143.5603 0.8376 3.3427 15.6306
ZINC04617811 3.7911 28.6083 139.1179 0.8464 3.4364 14.3505
ZINC03815093 8.2533 28.1672 510.3932 0.4821 3.5697 10.7614
ZINC03815222 8.9358 28.0526 511.6620 0.5122 3.4185 10.3199
ZINC00006798 2.3677 42.4380 98.4375 0.5040 4.4545 11.6118
ZINC01609260 3.6979 37.2983 104.9882 0.8250 3.7575 11.9570
ZINC03815377 10.0965 33.9829 208.2650 0.8682 3.7776 12.0735
ZINC03815366 5.4417 47.6948 121.4649 1.0012 4.5269 13.2945
ZINC03815351 6.0836 43.7940 128.4898 1.0325 4.3437 14.3436
ZINC03815376 3.3655 39.0079 153.8446 0.7782 3.7324 16.0630
ZINC01609268 3.6361 37.4272 148.2598 0.8166 3.6287 15.8635
ZINC03815391 8.7545 57.4848 138.6225 1.2893 5.2439 15.3639
ZINC03815323 9.1271 53.6217 232.3228 1.2581 4.9640 25.0817
ZINC03815390 5.7245 68.0927 216.2764 1.0311 6.6152 20.2510
ZINC03815324 6.5756 55.0430 292.4884 1.0679 5.0585 30.5805
ZINC03815025 5.0519 24.5424 626.7561 0.2695 3.2551 14.6625
ZINC03815106 4.9734 24.9114 633.5179 0.2660 3.1458 14.1277
ZINC04617810 1.5505 22.6508 189.6155 0.3538 2.7794 18.7675
ZINC04617809 1.5505 22.6510 189.6149 0.3538 2.7794 18.7674
ZINC03815339 3.2586 46.1171 116.4939 0.7890 4.4371 12.3275
ZINC04617808 3.2586 46.1168 116.4952 0.7890 4.4370 12.3275
ZINC04617792 3.3520 50.1757 106.2983 0.8104 5.0634 10.8026
ZINC04617793 1.4793 27.0467 188.5370 0.3673 3.8175 18.2586
ZINC03815184 1.4793 27.0466 188.5374 0.3673 3.8176 18.2586
ZINC04617794 3.3518 50.1748 106.2984 0.8104 5.0633 10.8026
ZINC04617801 5.8187 60.0431 106.6008 0.8833 6.2218 11.2560
ZINC04617802 4.1840 31.3380 202.1591 0.4661 4.0692 20.2929
ZINC04617803 3.8951 29.7071 207.4835 0.4486 3.9601 20.6972
ZINC03815267 5.6345 59.8788 109.0295 0.8178 6.2333 11.5358
ZINC04617798 2.6103 119.2837 189.8692 0.6870 11.5918 20.3970
ZINC03815217 3.2799 81.7245 143.4065 0.8354 7.8151 15.4454
ZINC04617797 2.7339 119.0755 189.8598 0.7129 11.5563 20.3943
ZINC04617799 3.2391 83.1031 143.4294 0.8346 7.9380 15.4651
ZINC03815395 6.9197 38.3109 95.8169 1.2407 3.9492 10.3705
ZINC00021592 2.7796 53.6519 115.2296 0.6399 5.0887 12.6349
ZINC03815265 6.7971 49.3206 237.0175 0.4107 5.3109 12.7124
ZINC00839396 3.4467 96.5287 196.6345 0.4333 5.3576 13.6817
ZINC03815082 3.7124 96.7957 182.6650 0.4319 5.6627 13.0981
ZINC03815194 7.4802 47.3065 257.5270 0.8383 4.7412 15.0052
ZINC00839389 11.6245 130.5250 243.2178 0.7401 5.2186 12.7802
ZINC03815150 3.4259 92.4894 192.3062 0.4237 5.3993 14.4975
ZINC03815169 3.6455 107.5983 180.7663 0.4726 6.0368 15.2191
ZINC00839395 3.6481 100.4232 209.0234 0.5101 5.0866 17.0429
ZINC03815219 3.3799 103.5448 211.7705 0.4843 5.2754 19.2788
ZINC04617814 13.1493 28.3835 133.6191 1.9201 3.2195 13.4649
ZINC03815409 13.5755 30.5796 123.8069 1.9656 3.4826 12.4445
ZINC03815213 6.0207 56.4653 205.6988 0.6659 5.6790 8.8749
ZINC03815151 5.4596 55.1184 201.4901 0.7074 5.8068 9.2482
ZINC03815230 9.9460 63.2361 234.1895 0.7700 5.7939 9.4665
ZINC00018522 2.0154 30.3215 183.7180 0.4382 3.6631 17.7178
ZINC03815160 6.6947 92.8569 165.2870 0.8532 6.7135 10.7070
ZINC03815171 4.5315 82.2156 149.3579 0.6500 7.3843 9.7082
ZINC03815161 7.2725 133.7181 152.5670 0.9246 6.8015 13.7809
ZINC03815158 5.9549 34.9301 152.3612 0.8643 3.9073 14.9651
ZINC03815305 8.0959 32.6070 151.7302 1.1850 3.5828 15.5772
ZINC03815157 12.8152 77.7913 459.5002 1.0203 5.2320 14.8304
ZINC03815396 3.3511 33.3639 179.1872 0.4809 3.7066 18.4329
ZINC03815371 4.6782 30.9087 181.0884 0.8525 3.3901 18.4943
ZINC03815389 6.5712 27.1096 183.6598 0.8984 3.4133 18.2769
ZINC03815403 7.6623 72.5561 210.7696 0.9321 6.9741 10.3733
ZINC00006094 5.9610 61.2620 106.6019 0.9568 6.6245 8.4224
ZINC00600430 8.3447 94.4086 132.1459 0.9733 6.7531 8.4501
ZINC03815123 2.9271 47.2687 228.7693 0.5357 5.0319 22.3677
ZINC03815071 18.9385 44.7967 719.5770 1.4155 3.6451 18.8246
ZINC03815047 4.0388 106.0228 649.7154 0.4935 4.1382 22.1590
ZINC03815094 7.1777 24.1058 250.7409 1.2353 2.7552 22.5268
ZINC03815098 18.3582 31.6465 757.2868 1.7536 2.6809 20.0565
ZINC03815164 6.4608 42.4490 224.0467 1.2250 4.4794 19.7275
ZINC03815076 8.7615 107.0224 551.5783 1.0440 4.3586 20.1499
ZINC03815354 16.8236 50.5634 254.0749 0.9539 2.7235 20.4080
ZINC00838734 16.7798 50.4477 249.8347 0.9342 2.6776 21.6232
ZINC00601820 16.7591 50.1319 259.4784 0.9113 2.6728 20.6406
ZINC03815288 20.5854 49.2560 279.6875 0.9308 2.9412 21.9044
ZINC03815350 21.4028 49.2150 250.7529 0.9401 3.6780 19.2410
ZINC03815309 17.1705 47.1084 333.2633 0.9489 2.5209 27.4857
ZINC03815223 15.8971 48.2459 325.4408 1.0255 2.4926 27.0690
ZINC02047503 15.8941 47.8334 333.1977 1.0321 2.5650 26.1506
ZINC03815370 19.7193 47.8061 283.3839 0.9341 3.2187 23.2701
ZINC03815299 24.0559 50.4188 322.7077 1.0287 3.1086 22.6320
ZINC03815128 13.8663 34.2042 750.5695 2.0077 4.0781 14.0965
ZINC03815114 3.2940 47.2403 257.8616 0.8058 4.7282 25.3696
ZINC03815099 11.0196 47.8810 175.1004 1.6266 4.7353 17.3447
ZINC03815074 3.3493 117.0552 681.9084 0.5870 4.1006 24.6260
ZINC03815065 9.5815 27.9104 776.4001 1.4207 3.5161 15.6960
ZINC03815091 6.7289 89.3953 632.9107 1.2875 3.0235 24.8104
ZINC03815279 10.8090 86.0518 703.4090 0.9112 5.8357 19.9567
ZINC03815062 10.5038 73.4477 818.0296 1.1790 3.0173 26.2664
ZINC03815132 5.4393 29.9330 322.8260 1.1465 3.3684 27.8204
ZINC03815113 4.0973 141.3333 603.2610 0.5004 5.1999 22.4808
ZINC03815105 13.9205 21.1988 985.6640 1.4239 3.1610 22.3197
ZINC00837641 10.4046 116.9544 126.6226 1.3578 7.6826 8.9589
ZINC03815109 11.8128 51.9263 230.8542 1.5342 5.6293 20.9176
ZINC03815122 2.9388 151.9921 651.6918 0.4789 4.8530 26.8818
ZINC03815147 16.2280 77.1168 594.0964 1.3823 5.9681 12.7042
ZINC03815178 9.4212 40.2129 295.2748 1.4658 4.3415 27.0596
ZINC03815155 10.8708 38.5367 310.5692 1.6096 4.1665 31.8768
ZINC04617805 3.1017 116.5847 237.5021 0.7791 10.5000 22.5039
ZINC04617806 3.1135 116.6808 237.2937 0.7660 10.5196 22.4947
ZINC04617807 4.0078 77.6512 184.1165 0.9455 7.6422 16.2031
ZINC03815325 3.7298 78.0525 184.8368 0.9269 7.6830 16.2412

View File

@@ -0,0 +1,12 @@
Mrv1682210021614062D
4 3 0 0 0 0 999 V2000
-1.0491 0.6027 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.3346 1.0152 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.3798 1.4277 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.7636 0.1902 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 3 0 0 0 0
2 3 1 0 0 0 0
1 4 1 0 0 0 0
M END

View File

@@ -0,0 +1,8 @@
Mrv1682210021614072D
2 1 0 0 0 0 999 V2000
-0.9152 0.2009 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.2007 0.6134 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
M END

View File

@@ -0,0 +1,17 @@
Mrv1682210021614062D
6 6 0 0 0 0 999 V2000
-0.3795 1.8964 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.0939 1.4839 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.0939 0.6589 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.3795 0.2464 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.3350 0.6589 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.3350 1.4839 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
2 3 2 0 0 0 0
3 4 1 0 0 0 0
4 5 2 0 0 0 0
5 6 1 0 0 0 0
1 6 2 0 0 0 0
M END

View File

@@ -0,0 +1,11 @@
Mrv1682210021614072D
3 3 0 0 0 0 999 V2000
-0.9152 0.2009 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.2007 0.6134 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.2007 -0.2116 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
2 3 1 0 0 0 0
1 3 1 0 0 0 0
M END

View File

@@ -0,0 +1,52 @@
#
# Copyright (C) 2016 Greg Landrum
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
# generates reference data for the PMI descriptors
from rdkit import Chem
from rdkit.Chem import AllChem
import numpy as np
from numpy import linalg
def GetMoments(mol, includeWeights):
conf = mol.GetConformer()
if includeWeights:
weights = [x.GetMass() for x in mol.GetAtoms()]
else:
weights = [1.0]*mol.GetNumAtoms()
pts = [conf.GetAtomPosition(i) for i in range(mol.GetNumAtoms())]
wSum = sum(weights)
origin = np.sum([pts[i]*weights[i] for i in range(mol.GetNumAtoms())], 0)
origin /= wSum
sumXX = 0
sumXY = 0
sumXZ = 0
sumYY = 0
sumYZ = 0
sumZZ = 0
sums = np.zeros((3, 3), np.double)
for j,pt in enumerate(pts):
dp = weights[j]*(pt - origin)
for i in range(3):
sums[i, i] += dp[i] * dp[i]
for j in range(i + 1, 3):
sums[i, j] += dp[i] * dp[j]
sums[j, i] += dp[i] * dp[j]
sums /= wSum
vals, vects = linalg.eigh(sums)
vals = sorted(vals)
return vals
if __name__ == '__main__':
suppl = Chem.SDMolSupplier('./PBF_egfr.sdf', removeHs=False)
output = open('./PMI_egfr.out', 'w+')
for m in suppl:
i1,i2,i3 = GetMoments(m,True)
mi1,mi2,mi3 = GetMoments(m,False)
print("%s %.4f %.4f %.4f %.4f %.4f %.4f"%(m.GetProp("_Name"),i1,i2,i3,mi1,mi2,mi3),file=output)

View File

@@ -1,6 +1,5 @@
// $Id$
//
// Copyright (C) 2003-2013 Greg Landrum and Rational Discovery LLC
// Copyright (C) 2003-2016 Greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
@@ -58,37 +57,54 @@ RDGeom::Point3D computeCentroid(const Conformer &conf, bool ignoreHs) {
res /= nAtms;
return res;
}
namespace {
void computeCovarianceTerms(const Conformer &conf,
const RDGeom::Point3D &center,
double &xx, double &xy, double &xz, double &yy, double &yz, double &zz,
bool normalize, bool ignoreHs,
const std::vector<double> *weights ){
PRECONDITION(!weights || weights->size()>=conf.getNumAtoms(), "bad weights vector");
xx = xy = xz = yy = yz = zz = 0.0;
const ROMol &mol = conf.getOwningMol();
double wSum = 0.0;
for (ROMol::ConstAtomIterator cai = mol.beginAtoms();
cai != mol.endAtoms(); cai++) {
if (((*cai)->getAtomicNum() == 1) && (ignoreHs)) {
continue;
}
RDGeom::Point3D loc = conf.getAtomPos((*cai)->getIdx());
loc -= center;
if(weights) {
double w = (*weights)[(*cai)->getIdx()];
wSum += w;
loc *= w;
} else {
wSum+=1.0;
}
xx += loc.x * loc.x;
xy += loc.x * loc.y;
xz += loc.x * loc.z;
yy += loc.y * loc.y;
yz += loc.y * loc.z;
zz += loc.z * loc.z;
}
if (normalize) {
xx /= wSum;
xy /= wSum;
xz /= wSum;
yy /= wSum;
yz /= wSum;
zz /= wSum;
}
}
RDNumeric::DoubleSymmMatrix *computeCovarianceMatrix(
const Conformer &conf, const RDGeom::Point3D &center, bool normalize,
bool ignoreHs) {
double xx, xy, xz, yy, yz, zz;
xx = xy = xz = yy = yz = zz = 0.0;
const ROMol &mol = conf.getOwningMol();
ROMol::ConstAtomIterator cai;
unsigned int nAtms = 0;
for (cai = mol.beginAtoms(); cai != mol.endAtoms(); cai++) {
if (((*cai)->getAtomicNum() == 1) && (ignoreHs)) {
continue;
}
RDGeom::Point3D loc = conf.getAtomPos((*cai)->getIdx());
loc -= center;
xx += loc.x * loc.x;
xy += loc.x * loc.y;
xz += loc.x * loc.z;
yy += loc.y * loc.y;
yz += loc.y * loc.z;
zz += loc.z * loc.z;
nAtms++;
}
if (normalize) {
xx /= nAtms;
xy /= nAtms;
xz /= nAtms;
yy /= nAtms;
yz /= nAtms;
zz /= nAtms;
}
computeCovarianceTerms(conf,center,xx,xy,xz,yy,yz,zz,normalize,ignoreHs,NULL);
RDNumeric::DoubleSymmMatrix *res = new RDNumeric::DoubleSymmMatrix(3, 3);
res->setVal(0, 0, xx);
res->setVal(0, 1, xy);
@@ -98,6 +114,68 @@ RDNumeric::DoubleSymmMatrix *computeCovarianceMatrix(
res->setVal(2, 2, zz);
return res;
}
}
#ifdef RDK_HAS_EIGEN3
#include <Eigen/Dense>
bool computePrincipalAxesAndMoments(
const RDKit::Conformer &conf,
Eigen::Matrix3d &axes,
Eigen::Vector3d &moments,
bool ignoreHs,
bool force,
const std::vector<double> *weights){
PRECONDITION((!weights || weights->size()>=conf.getNumAtoms()),"bad weights vector");
const char *axesPropName = ignoreHs ? "_principalAxes_noH" : "_principalAxes";
const char *momentsPropName = ignoreHs ? "_principalMoments_noH" : "_principalMoments";
if(!weights && !force &&
conf.getOwningMol().hasProp(axesPropName) &&
conf.getOwningMol().hasProp(momentsPropName) ){
conf.getOwningMol().getProp(axesPropName,axes);
conf.getOwningMol().getProp(momentsPropName,moments);
return true;
}
const ROMol &mol=conf.getOwningMol();
RDGeom::Point3D origin(0,0,0);
double wSum=0.0;
for(unsigned int i=0;i<conf.getNumAtoms();++i){
if(ignoreHs && mol.getAtomWithIdx(i)->getAtomicNum()==1) continue;
double w=1.0;
if(weights){
w=(*weights)[i];
}
wSum+=w;
origin+=conf.getAtomPos(i)*w;
}
// std::cerr<<" origin: "<<origin<<" "<<wSum<<std::endl;
origin /= wSum;
double sumXX,sumXY,sumXZ,sumYY,sumYZ,sumZZ;
computeCovarianceTerms(conf,origin,sumXX,sumXY,sumXZ,sumYY,sumYZ,sumZZ,
true,ignoreHs,weights);
Eigen::Matrix3d mat;
mat << sumXX, sumXY, sumXZ,
sumXY, sumYY, sumYZ,
sumXZ, sumYZ, sumZZ;
// std::cerr<<" matrix: "<<mat<<std::endl;
Eigen::SelfAdjointEigenSolver<Eigen::Matrix3d> eigensolver(mat);
if(eigensolver.info()!=Eigen::Success){
BOOST_LOG(rdErrorLog)<<"eigenvalue calculation did not converge"<<std::endl;
return false;
}
axes = eigensolver.eigenvectors();
moments = eigensolver.eigenvalues();
if(!weights) {
conf.getOwningMol().setProp(axesPropName,axes, true);
conf.getOwningMol().setProp(momentsPropName,moments, true);
}
return true;
}
#endif
RDGeom::Transform3D *computeCanonicalTransform(const Conformer &conf,
const RDGeom::Point3D *center,

View File

@@ -13,6 +13,10 @@
#include <Geometry/point.h>
#include <Numerics/SymmMatrix.h>
#ifdef RDK_HAS_EIGEN3
#include <Eigen/Dense>
#endif
namespace RDKit {
class ROMol;
class Atom;
@@ -38,17 +42,28 @@ void transformAtom(RDKit::Atom *atom, RDGeom::Transform3D &tform);
RDGeom::Point3D computeCentroid(const RDKit::Conformer &conf,
bool ignoreHs = true);
//! Compute the covariance matrix for a conformer
#ifdef RDK_HAS_EIGEN3
//! Compute principal axes and moments for a conformer
/*!
\param conf Conformer of interest
\param center Center to be used for covariance matrix calculation
\param normalize If true, normalize the covariance matrix by the number of
atoms
\param axes used to return the principal axes
\param moments used to return the principal moments
\param ignoreHs If true, ignore hydrogen atoms
\param force If true, the calculation will be carried out even if a cached value is present
\param weights If present used to weight the atomic coordinates
\returns whether or not the calculation was successful
*/
RDNumeric::DoubleSymmMatrix *computeCovarianceMatrix(
const RDKit::Conformer &conf, const RDGeom::Point3D &center,
bool normalize = false, bool ignoreHs = true);
bool computePrincipalAxesAndMoments(
const RDKit::Conformer &conf,
Eigen::Matrix3d &axes,
Eigen::Vector3d &moments,
bool ignoreHs = true,
bool force = false,
const std::vector<double> *weights = NULL);
#endif
//! Compute the transformation require to orient the conformation
//! along the principal axes about the center; i.e. center is made to coincide

View File

@@ -1,21 +1,21 @@
/*
/*
* $Id$
*
* Copyright (c) 2010, Novartis Institutes for BioMedical Research Inc.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* met:
*
* * Redistributions of source code must retain the above copyright
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Novartis Institutes for BioMedical Research Inc.
* nor the names of its contributors may be used to endorse or promote
* * Neither the name of Novartis Institutes for BioMedical Research Inc.
* nor the names of its contributors may be used to endorse or promote
* products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -53,13 +53,6 @@
return MolTransforms::computeCentroid(*($self), ignoreHs);
}
RDNumeric::DoubleSymmMatrix *computeCovarianceMatrix(const RDGeom::Point3D &center,
bool normalize=false,
bool ignoreHs=true) {
return MolTransforms::computeCovarianceMatrix(*($self), center, normalize, ignoreHs);
}
RDGeom::Transform3D *computeCanonicalTransform(const RDGeom::Point3D *center=0,
bool normalizeCovar=false,
bool ignoreHs=true) {

View File

@@ -0,0 +1,81 @@
# - Try to find Eigen3 lib
#
# This module supports requiring a minimum version, e.g. you can do
# find_package(Eigen3 3.1.2)
# to require version 3.1.2 or newer of Eigen3.
#
# Once done this will define
#
# EIGEN3_FOUND - system has eigen lib with correct version
# EIGEN3_INCLUDE_DIR - the eigen include directory
# EIGEN3_VERSION - eigen version
# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
if(NOT Eigen3_FIND_VERSION)
if(NOT Eigen3_FIND_VERSION_MAJOR)
set(Eigen3_FIND_VERSION_MAJOR 2)
endif(NOT Eigen3_FIND_VERSION_MAJOR)
if(NOT Eigen3_FIND_VERSION_MINOR)
set(Eigen3_FIND_VERSION_MINOR 91)
endif(NOT Eigen3_FIND_VERSION_MINOR)
if(NOT Eigen3_FIND_VERSION_PATCH)
set(Eigen3_FIND_VERSION_PATCH 0)
endif(NOT Eigen3_FIND_VERSION_PATCH)
set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
endif(NOT Eigen3_FIND_VERSION)
macro(_eigen3_check_version)
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
set(EIGEN3_VERSION_OK FALSE)
else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
set(EIGEN3_VERSION_OK TRUE)
endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
if(NOT EIGEN3_VERSION_OK)
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
"but at least version ${Eigen3_FIND_VERSION} is required")
endif(NOT EIGEN3_VERSION_OK)
endmacro(_eigen3_check_version)
if (EIGEN3_INCLUDE_DIR)
# in cache already
_eigen3_check_version()
set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
else (EIGEN3_INCLUDE_DIR)
find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
PATHS
${CMAKE_INSTALL_PREFIX}/include
${KDE4_INCLUDE_DIR}
PATH_SUFFIXES eigen3 eigen
)
if(EIGEN3_INCLUDE_DIR)
_eigen3_check_version()
endif(EIGEN3_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
mark_as_advanced(EIGEN3_INCLUDE_DIR)
endif(EIGEN3_INCLUDE_DIR)