From f8f266b6ab8e69412746c0153221d09054b8d7a8 Mon Sep 17 00:00:00 2001 From: rubbs14 Date: Sun, 15 Feb 2026 17:55:02 +0100 Subject: [PATCH] bump to v 0.0.3 - fixed pkg_resources deprecation with setuptools > 81; added pyproject.toml for installation; cleaned testing files and paths; added distribution/packaging files to .gitignore --- .gitignore | 22 +++++++- MANIFEST.in | 7 +++ espsim/helpers.py | 49 ++++++++-------- espsim/testfiles/__init__.py | 1 + {scripts => espsim/testfiles}/prbmol1.mol | 0 {scripts => espsim/testfiles}/prbmol1.mol2 | 0 {scripts => espsim/testfiles}/prbmol1.sdf | 0 {scripts => espsim/testfiles}/refmol1.mol | 0 {scripts => espsim/testfiles}/refmol1.mol2 | 0 {scripts => espsim/testfiles}/refmol1.sdf | 0 pyproject.toml | 65 ++++++++++++++++++++++ scripts/test_esp_function.py | 34 +++++++---- setup.py | 31 ----------- testfiles/prbmol1.mol | 31 +++++++++++ testfiles/prbmol1.mol2 | 33 +++++++++++ testfiles/prbmol1.sdf | 34 +++++++++++ testfiles/refmol1.mol | 44 +++++++++++++++ testfiles/refmol1.mol2 | 46 +++++++++++++++ testfiles/refmol1.sdf | 47 ++++++++++++++++ 19 files changed, 376 insertions(+), 68 deletions(-) create mode 100644 MANIFEST.in create mode 100644 espsim/testfiles/__init__.py rename {scripts => espsim/testfiles}/prbmol1.mol (100%) rename {scripts => espsim/testfiles}/prbmol1.mol2 (100%) rename {scripts => espsim/testfiles}/prbmol1.sdf (100%) rename {scripts => espsim/testfiles}/refmol1.mol (100%) rename {scripts => espsim/testfiles}/refmol1.mol2 (100%) rename {scripts => espsim/testfiles}/refmol1.sdf (100%) create mode 100644 pyproject.toml delete mode 100644 setup.py create mode 100644 testfiles/prbmol1.mol create mode 100644 testfiles/prbmol1.mol2 create mode 100644 testfiles/prbmol1.sdf create mode 100644 testfiles/refmol1.mol create mode 100644 testfiles/refmol1.mol2 create mode 100644 testfiles/refmol1.sdf diff --git a/.gitignore b/.gitignore index 4aa93d8..4da7718 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,22 @@ *~ -__pychache__/ \ No newline at end of file +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST +*.pyc \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..ccf222c --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,7 @@ +include README.md +include LICENSE.txt +recursive-include espsim *.pt +recursive-include espsim/testfiles *.mol *.mol2 *.sdf +recursive-include benchmarks *.ipynb +recursive-include scripts *.py *.ipynb +recursive-include workshop *.ipynb *.md diff --git a/espsim/helpers.py b/espsim/helpers.py index 8a95f94..2439ab0 100644 --- a/espsim/helpers.py +++ b/espsim/helpers.py @@ -4,7 +4,7 @@ from argparse import Namespace import os import contextlib -import pkg_resources +from importlib.resources import files, as_file import warnings import logging @@ -144,29 +144,30 @@ def mlCharges(mols): #MUST use mols with hydrogens! smiles = [Chem.MolToSmiles(mol) for mol in mols] - path = pkg_resources.resource_filename(__name__, 'QM_137k.pt') - args = Namespace(batch_size=50, checkpoint_dir=None, checkpoint_path=path, checkpoint_paths=[path], cuda=False, features_generator=None, features_path=None, gpu=None, max_data_size=None, no_features_scaling=False, preds_path=None, test_path=None, use_compound_names=False) - - with open(os.devnull, 'w') as devnull: - with contextlib.redirect_stdout(devnull): - test_preds, test_smiles = make_predictions(args, smiles=smiles) - n_atoms, n_bonds = zip(*[num_atoms_bonds(x) for x in smiles]) - partial_charge = test_preds[0] - partial_charge = np.split(partial_charge.flatten(), np.cumsum(np.array(n_atoms)))[:-1] - - charges=[] - for i,mol in enumerate(mols): - try: - reorder_list = get_reorder_list(mol) - charges.append([partial_charge[i][reorder_list[x]] for x in range(mol.GetNumAtoms())]) - except ValueError: - #Could not get prediction, default to Gasteiger - print("Warning: could not obtain prediction, defaulting to Gasteiger charges for one molecule") - AllChem.ComputeGasteigerCharges(mol) - charges.append([a.GetDoubleProp('_GasteigerCharge') for a in mol.GetAtoms()]) - - - return charges + model_file = files('espsim').joinpath('QM_137k.pt') + with as_file(model_file) as path: + args = Namespace(batch_size=50, checkpoint_dir=None, checkpoint_path=str(path), checkpoint_paths=[str(path)], cuda=False, features_generator=None, features_path=None, gpu=None, max_data_size=None, no_features_scaling=False, preds_path=None, test_path=None, use_compound_names=False) + + with open(os.devnull, 'w') as devnull: + with contextlib.redirect_stdout(devnull): + test_preds, test_smiles = make_predictions(args, smiles=smiles) + n_atoms, n_bonds = zip(*[num_atoms_bonds(x) for x in smiles]) + partial_charge = test_preds[0] + partial_charge = np.split(partial_charge.flatten(), np.cumsum(np.array(n_atoms)))[:-1] + + charges=[] + for i,mol in enumerate(mols): + try: + reorder_list = get_reorder_list(mol) + charges.append([partial_charge[i][reorder_list[x]] for x in range(mol.GetNumAtoms())]) + except ValueError: + #Could not get prediction, default to Gasteiger + print("Warning: could not obtain prediction, defaulting to Gasteiger charges for one molecule") + AllChem.ComputeGasteigerCharges(mol) + charges.append([a.GetDoubleProp('_GasteigerCharge') for a in mol.GetAtoms()]) + + + return charges except ImportError: def mlCharges(mols): diff --git a/espsim/testfiles/__init__.py b/espsim/testfiles/__init__.py new file mode 100644 index 0000000..142c696 --- /dev/null +++ b/espsim/testfiles/__init__.py @@ -0,0 +1 @@ +"""Test data files for espsim package.""" diff --git a/scripts/prbmol1.mol b/espsim/testfiles/prbmol1.mol similarity index 100% rename from scripts/prbmol1.mol rename to espsim/testfiles/prbmol1.mol diff --git a/scripts/prbmol1.mol2 b/espsim/testfiles/prbmol1.mol2 similarity index 100% rename from scripts/prbmol1.mol2 rename to espsim/testfiles/prbmol1.mol2 diff --git a/scripts/prbmol1.sdf b/espsim/testfiles/prbmol1.sdf similarity index 100% rename from scripts/prbmol1.sdf rename to espsim/testfiles/prbmol1.sdf diff --git a/scripts/refmol1.mol b/espsim/testfiles/refmol1.mol similarity index 100% rename from scripts/refmol1.mol rename to espsim/testfiles/refmol1.mol diff --git a/scripts/refmol1.mol2 b/espsim/testfiles/refmol1.mol2 similarity index 100% rename from scripts/refmol1.mol2 rename to espsim/testfiles/refmol1.mol2 diff --git a/scripts/refmol1.sdf b/espsim/testfiles/refmol1.sdf similarity index 100% rename from scripts/refmol1.sdf rename to espsim/testfiles/refmol1.sdf diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9ce5195 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,65 @@ +[build-system] +requires = ["setuptools>=45", "wheel", "setuptools-scm[toml]>=6.2"] +build-backend = "setuptools.build_meta" + +[project] +name = "espsim" +version = "0.0.2" +description = "Scoring of shape and ESP similarity with RDKit" +readme = "README.md" +license = {text = "MIT"} +authors = [ + {name = "Esther Heid", email = "eheid@mit.edu"} +] +classifiers = [ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent" +] +keywords = [ + "chemistry", + "electrostatic potential", + "shape", + "similarity", + "RDKit" +] +requires-python = ">=3.9" +dependencies = [ + "rdkit>=2023.03", + "torch>=2.0", + "numpy<2", + "scikit-learn>=1.0", + "scipy>=1.8", + "matplotlib>=3.5", + "joblib>=1.2", + "tqdm>=4.6", + "py3dmol>=0.8", +] + +[project.optional-dependencies] +dev = [ + "jupyter>=1.0", + "pytest>=7.0", + "black>=23.0", + "flake8>=4.0", + "mypy>=1.0", +] +chemprop = [ + "chemprop-atom-bond @ git+https://github.com/hesther/chemprop-atom-bond.git", +] +psi4 = [ + "psi4>=1.5", + "resp>=1.0", +] + +[project.urls] +Homepage = "https://github.com/hesther/espsim" +Repository = "https://github.com/hesther/espsim" +Issues = "https://github.com/hesther/espsim/issues" + +[tool.setuptools] +packages = ["espsim", "espsim.testfiles"] +include-package-data = true diff --git a/scripts/test_esp_function.py b/scripts/test_esp_function.py index e9d72d4..521470b 100644 --- a/scripts/test_esp_function.py +++ b/scripts/test_esp_function.py @@ -1,22 +1,32 @@ from espsim import GetEspSim, readMolFile, readMol2File, readSdfFile +from importlib.resources import files, as_file + +# Get paths to test files from package data +testfiles = files('espsim.testfiles') #The following block of code reads in prealigned molecules in mol format and calculates their ESP similarity: -mol1=readMolFile("scripts/prbmol1.mol") -mol2=readMolFile("scripts/refmol1.mol") -sim_esp=GetEspSim(mol1,mol2) -print("%15s %5.2f" % ("ESP similarity (mols read from mol file):",sim_esp)) +with as_file(testfiles.joinpath('prbmol1.mol')) as prbmol_path, \ + as_file(testfiles.joinpath('refmol1.mol')) as refmol_path: + mol1=readMolFile(str(prbmol_path)) + mol2=readMolFile(str(refmol_path)) + sim_esp=GetEspSim(mol1,mol2) + print("%15s %5.2f" % ("ESP similarity (mols read from mol file):",sim_esp)) #The following block of code reads in prealigned molecules in mol2 format with custom charges and calculates their ESP similarity: -mol1,charge1=readMol2File("scripts/prbmol1.mol2") -mol2,charge2=readMol2File("scripts/refmol1.mol2") -sim_esp=GetEspSim(mol1,mol2,prbCharge=charge1,refCharge=charge2) -print("%15s %5.2f" % ("ESP similarity (mols read from mol2 file):",sim_esp)) +with as_file(testfiles.joinpath('prbmol1.mol2')) as prbmol_path, \ + as_file(testfiles.joinpath('refmol1.mol2')) as refmol_path: + mol1,charge1=readMol2File(str(prbmol_path)) + mol2,charge2=readMol2File(str(refmol_path)) + sim_esp=GetEspSim(mol1,mol2,prbCharge=charge1,refCharge=charge2) + print("%15s %5.2f" % ("ESP similarity (mols read from mol2 file):",sim_esp)) #The following block of code reads in prealigned molecules in sdf format with custom charges as a comma-separated list #in the SDF file and calculates their ESP similarity: -mol1,charge1=readSdfFile("scripts/prbmol1.sdf") -mol2,charge2=readSdfFile("scripts/refmol1.sdf") -sim_esp=GetEspSim(mol1,mol2,prbCharge=charge1,refCharge=charge2) -print("%15s %5.2f" % ("ESP similarity (mols read from sdf file):",sim_esp)) +with as_file(testfiles.joinpath('prbmol1.sdf')) as prbmol_path, \ + as_file(testfiles.joinpath('refmol1.sdf')) as refmol_path: + mol1,charge1=readSdfFile(str(prbmol_path)) + mol2,charge2=readSdfFile(str(refmol_path)) + sim_esp=GetEspSim(mol1,mol2,prbCharge=charge1,refCharge=charge2) + print("%15s %5.2f" % ("ESP similarity (mols read from sdf file):",sim_esp)) diff --git a/setup.py b/setup.py deleted file mode 100644 index 2d0ca17..0000000 --- a/setup.py +++ /dev/null @@ -1,31 +0,0 @@ -from setuptools import find_packages, setup - -with open('README.md', encoding='utf-8') as f: - long_description = f.read() - -setup( - name='espsim', - version='0.0.1', - author='Esther Heid', - author_email='eheid@mit.edu', - description='Scoring of shape and ESP similarity with RDKit', - long_description=long_description, - long_description_content_type='text/markdown', - url='https://github.com/hesther/espsim', - license='MIT', - packages=find_packages(), - classifiers=[ - 'Programming Language :: Python :: 3', - 'License :: OSI Approved :: MIT License', - 'Operating System :: OS Independent' - ], - keywords=[ - 'chemistry', - 'electrostatic potential', - 'shape', - 'similarity', - 'RDKit' - ], - include_package_data=True, - package_data={'': ['QM_137k.pt']}, -) diff --git a/testfiles/prbmol1.mol b/testfiles/prbmol1.mol new file mode 100644 index 0000000..b8b8b54 --- /dev/null +++ b/testfiles/prbmol1.mol @@ -0,0 +1,31 @@ + + RDKit 3D + + 13 12 0 0 0 0 0 0 0 0999 V2000 + -1.0829 -0.6637 -0.5103 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.2977 0.2486 0.4436 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.1617 -0.0925 0.4114 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.6689 -0.7861 1.3333 O 0 0 0 0 0 0 0 0 0 0 0 0 + 1.9501 0.3238 -0.6576 O 0 0 0 0 0 0 0 0 0 0 0 0 + -0.4657 1.5946 0.0836 O 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6651 -0.4911 -1.8389 O 0 0 0 0 0 0 0 0 0 0 0 0 + -0.9239 -1.7249 -0.2214 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.1739 -0.4579 -0.4169 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6777 0.0902 1.4808 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.9334 0.0857 -0.7021 H 0 0 0 0 0 0 0 0 0 0 0 0 + -1.3815 1.8546 0.3656 H 0 0 0 0 0 0 0 0 0 0 0 0 + -1.1122 0.3289 -2.1752 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 1 0 + 2 3 1 0 + 3 4 2 0 + 3 5 1 0 + 2 6 1 0 + 1 7 1 0 + 1 8 1 0 + 1 9 1 0 + 2 10 1 0 + 5 11 1 0 + 6 12 1 0 + 7 13 1 0 +M END + diff --git a/testfiles/prbmol1.mol2 b/testfiles/prbmol1.mol2 new file mode 100644 index 0000000..d3a9afa --- /dev/null +++ b/testfiles/prbmol1.mol2 @@ -0,0 +1,33 @@ +@MOLECULE +***** + 13 12 0 0 0 +SMALL +GASTEIGER + +@ATOM + 1 C -1.0829 -0.6637 -0.5103 C.3 1 UNL1 0.079954117054076082 + 2 C -0.2977 0.2486 0.4436 C.3 1 UNL1 0.17402774992656297 + 3 C 1.1617 -0.0925 0.4114 C.2 1 UNL1 0.33445172084859559 + 4 O 1.6689 -0.7861 1.3333 O.2 1 UNL1 -0.24924322634924762 + 5 O 1.9501 0.3238 -0.6576 O.3 1 UNL1 -0.47926124554573318 + 6 O -0.4657 1.5946 0.0836 O.3 1 UNL1 -0.37926397069925832 + 7 O -0.6651 -0.4911 -1.8389 O.3 1 UNL1 -0.3930474388646486 + 8 H -0.9239 -1.7249 -0.2214 H 1 UNL1 0.059756578060591724 + 9 H -2.1739 -0.4579 -0.4169 H 1 UNL1 0.059756578060591724 + 10 H -0.6777 0.0902 1.4808 H 1 UNL1 0.074910619371653109 + 11 H 2.9334 0.0857 -0.7021 H 1 UNL1 0.2963731884212602 + 12 H -1.3815 1.8546 0.3656 H 1 UNL1 0.21139157568550943 + 13 H -1.1122 0.3289 -2.1752 H 1 UNL1 0.21019375403004686 +@BOND + 1 1 2 1 + 2 2 3 1 + 3 3 4 2 + 4 3 5 1 + 5 2 6 1 + 6 1 7 1 + 7 1 8 1 + 8 1 9 1 + 9 2 10 1 + 10 5 11 1 + 11 6 12 1 + 12 7 13 1 diff --git a/testfiles/prbmol1.sdf b/testfiles/prbmol1.sdf new file mode 100644 index 0000000..e1decce --- /dev/null +++ b/testfiles/prbmol1.sdf @@ -0,0 +1,34 @@ + + RDKit 3D + + 13 12 0 0 0 0 0 0 0 0999 V2000 + -1.0829 -0.6637 -0.5103 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.2977 0.2486 0.4436 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.1617 -0.0925 0.4114 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.6689 -0.7861 1.3333 O 0 0 0 0 0 0 0 0 0 0 0 0 + 1.9501 0.3238 -0.6576 O 0 0 0 0 0 0 0 0 0 0 0 0 + -0.4657 1.5946 0.0836 O 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6651 -0.4911 -1.8389 O 0 0 0 0 0 0 0 0 0 0 0 0 + -0.9239 -1.7249 -0.2214 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.1739 -0.4579 -0.4169 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6777 0.0902 1.4808 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.9334 0.0857 -0.7021 H 0 0 0 0 0 0 0 0 0 0 0 0 + -1.3815 1.8546 0.3656 H 0 0 0 0 0 0 0 0 0 0 0 0 + -1.1122 0.3289 -2.1752 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 1 0 + 2 3 1 0 + 3 4 2 0 + 3 5 1 0 + 2 6 1 0 + 1 7 1 0 + 1 8 1 0 + 1 9 1 0 + 2 10 1 0 + 5 11 1 0 + 6 12 1 0 + 7 13 1 0 +M END +> (1) +0.079954117054076082,0.17402774992656297,0.33445172084859559,-0.24924322634924762,-0.47926124554573318,-0.37926397069925832,-0.3930474388646486,0.059756578060591724,0.059756578060591724,0.074910619371653109,0.2963731884212602,0.21139157568550943,0.21019375403004686 + +$$$$ diff --git a/testfiles/refmol1.mol b/testfiles/refmol1.mol new file mode 100644 index 0000000..3df18c3 --- /dev/null +++ b/testfiles/refmol1.mol @@ -0,0 +1,44 @@ + + RDKit 3D + + 19 19 0 0 0 0 0 0 0 0999 V2000 + -2.4221 -2.3715 -2.2672 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.4433 -2.6197 -0.8925 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.7629 -1.7692 -0.0154 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.0616 -0.6544 -0.5079 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.0351 -0.4210 -1.8957 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.7170 -1.2744 -2.7684 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3019 0.2449 0.4424 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.1570 -0.0966 0.4089 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.6657 -0.7876 1.3321 O 0 0 0 0 0 0 0 0 0 0 0 0 + 1.9461 0.3212 -0.6592 O 0 0 0 0 0 0 0 0 0 0 0 0 + -0.4675 1.5927 0.0857 O 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9484 -3.0317 -2.9445 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9847 -3.4736 -0.5061 H 0 0 0 0 0 0 0 0 0 0 0 0 + -1.7826 -1.9811 1.0464 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.4859 0.4195 -2.3011 H 0 0 0 0 0 0 0 0 0 0 0 0 + -1.6959 -1.0869 -3.8342 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6753 0.0966 1.4839 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.9304 0.0858 -0.7021 H 0 0 0 0 0 0 0 0 0 0 0 0 + -1.3844 1.8525 0.3644 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 2 0 + 2 3 1 0 + 3 4 2 0 + 4 5 1 0 + 5 6 2 0 + 4 7 1 0 + 7 8 1 0 + 8 9 2 0 + 8 10 1 0 + 7 11 1 0 + 6 1 1 0 + 1 12 1 0 + 2 13 1 0 + 3 14 1 0 + 5 15 1 0 + 6 16 1 0 + 7 17 1 0 + 10 18 1 0 + 11 19 1 0 +M END + diff --git a/testfiles/refmol1.mol2 b/testfiles/refmol1.mol2 new file mode 100644 index 0000000..1d3d04c --- /dev/null +++ b/testfiles/refmol1.mol2 @@ -0,0 +1,46 @@ +@MOLECULE +***** + 19 19 0 0 0 +SMALL +GASTEIGER + +@ATOM + 1 C -2.4221 -2.3715 -2.2672 C.ar 1 UNL1 -0.062245050409760132 + 2 C -2.4433 -2.6197 -0.8925 C.ar 1 UNL1 -0.061880962140324541 + 3 C -1.7629 -1.7692 -0.0154 C.ar 1 UNL1 -0.055841015094001294 + 4 C -1.0616 -0.6544 -0.5079 C.ar 1 UNL1 -0.0083519567098385948 + 5 C -1.0351 -0.4210 -1.8957 C.ar 1 UNL1 -0.055841015094001294 + 6 C -1.7170 -1.2744 -2.7684 C.ar 1 UNL1 -0.061880962140324541 + 7 C -0.3019 0.2449 0.4424 C.3 1 UNL1 0.17618951064162852 + 8 C 1.1570 -0.0966 0.4089 C.2 1 UNL1 0.33671386228928729 + 9 O 1.6657 -0.7876 1.3321 O.2 1 UNL1 -0.24892118256048665 + 10 O 1.9461 0.3212 -0.6592 O.3 1 UNL1 -0.47906638775860522 + 11 O -0.4675 1.5927 0.0857 O.3 1 UNL1 -0.37690455770814901 + 12 H -2.9484 -3.0317 -2.9445 H 1 UNL1 0.062268924338564624 + 13 H -2.9847 -3.4736 -0.5061 H 1 UNL1 0.062280504910251597 + 14 H -1.7826 -1.9811 1.0464 H 1 UNL1 0.062675629333544078 + 15 H -0.4859 0.4195 -2.3011 H 1 UNL1 0.062675629333544078 + 16 H -1.6959 -1.0869 -3.8342 H 1 UNL1 0.062280504910251597 + 17 H -0.6753 0.0966 1.4839 H 1 UNL1 0.077692997269491193 + 18 H 2.9304 0.0858 -0.7021 H 1 UNL1 0.29638489746667696 + 19 H -1.3844 1.8525 0.3644 H 1 UNL1 0.21177062912225131 +@BOND + 1 1 2 ar + 2 2 3 ar + 3 3 4 ar + 4 4 5 ar + 5 5 6 ar + 6 4 7 1 + 7 7 8 1 + 8 8 9 2 + 9 8 10 1 + 10 7 11 1 + 11 6 1 ar + 12 1 12 1 + 13 2 13 1 + 14 3 14 1 + 15 5 15 1 + 16 6 16 1 + 17 7 17 1 + 18 10 18 1 + 19 11 19 1 diff --git a/testfiles/refmol1.sdf b/testfiles/refmol1.sdf new file mode 100644 index 0000000..64bc44d --- /dev/null +++ b/testfiles/refmol1.sdf @@ -0,0 +1,47 @@ + + RDKit 3D + + 19 19 0 0 0 0 0 0 0 0999 V2000 + -2.4221 -2.3715 -2.2672 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.4433 -2.6197 -0.8925 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.7629 -1.7692 -0.0154 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.0616 -0.6544 -0.5079 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.0351 -0.4210 -1.8957 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.7170 -1.2744 -2.7684 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3019 0.2449 0.4424 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.1570 -0.0966 0.4089 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.6657 -0.7876 1.3321 O 0 0 0 0 0 0 0 0 0 0 0 0 + 1.9461 0.3212 -0.6592 O 0 0 0 0 0 0 0 0 0 0 0 0 + -0.4675 1.5927 0.0857 O 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9484 -3.0317 -2.9445 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9847 -3.4736 -0.5061 H 0 0 0 0 0 0 0 0 0 0 0 0 + -1.7826 -1.9811 1.0464 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.4859 0.4195 -2.3011 H 0 0 0 0 0 0 0 0 0 0 0 0 + -1.6959 -1.0869 -3.8342 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6753 0.0966 1.4839 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.9304 0.0858 -0.7021 H 0 0 0 0 0 0 0 0 0 0 0 0 + -1.3844 1.8525 0.3644 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 2 0 + 2 3 1 0 + 3 4 2 0 + 4 5 1 0 + 5 6 2 0 + 4 7 1 0 + 7 8 1 0 + 8 9 2 0 + 8 10 1 0 + 7 11 1 0 + 6 1 1 0 + 1 12 1 0 + 2 13 1 0 + 3 14 1 0 + 5 15 1 0 + 6 16 1 0 + 7 17 1 0 + 10 18 1 0 + 11 19 1 0 +M END +> (1) +-0.062245050409760132,-0.061880962140324541,-0.055841015094001294,-0.0083519567098385948,-0.055841015094001294,-0.061880962140324541,0.17618951064162852,0.33671386228928729,-0.24892118256048665,-0.47906638775860522,-0.37690455770814901,0.062268924338564624,0.062280504910251597,0.062675629333544078,0.062675629333544078,0.062280504910251597,0.077692997269491193,0.29638489746667696,0.21177062912225131 + +$$$$