rdworks 0.36.2__tar.gz → 0.36.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rdworks-0.36.2 → rdworks-0.36.3}/PKG-INFO +1 -1
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/__init__.py +1 -1
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/mol.py +50 -44
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks.egg-info/PKG-INFO +1 -1
- {rdworks-0.36.2 → rdworks-0.36.3}/LICENSE +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/README.md +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/pyproject.toml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/setup.cfg +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/autograph/__init__.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/autograph/autograph.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/autograph/centroid.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/autograph/dynamictreecut.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/autograph/nmrclust.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/autograph/rckmeans.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/bitqt/__init__.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/bitqt/bitqt.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/conf.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/descriptor.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/display.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/ionized.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/matchedseries.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/mollibr.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/pka.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Asinex_fragment.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Astex_RO3.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Baell2010_PAINS/Baell2010A.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Baell2010_PAINS/Baell2010B.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Baell2010_PAINS/Baell2010C.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Baell2010_PAINS/PAINS-less-than-015-hits.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Baell2010_PAINS/PAINS-less-than-150-hits.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Baell2010_PAINS/PAINS-more-than-150-hits.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Baell2010_PAINS/makexml.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Brenk2008_Dundee/makexml.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/CNS.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/BMS.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/Dundee.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/Glaxo.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/Inpharmatica.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/LINT.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/MLSMR.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/PAINS.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/SureChEMBL.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/makexml.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Hann1999_Glaxo/Hann1999.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Hann1999_Glaxo/Hann1999Acid.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Hann1999_Glaxo/Hann1999Base.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Hann1999_Glaxo/Hann1999ElPh.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Hann1999_Glaxo/Hann1999NuPh.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Hann1999_Glaxo/makexml.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Kazius2005/Kazius2005.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Kazius2005/makexml.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ZINC_druglike.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ZINC_fragment.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ZINC_leadlike.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/fragment.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ionized/simple_smarts_pattern.csv +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ionized/smarts_pattern.csv +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/misc/makexml.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/misc/reactive-part-2.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/misc/reactive-part-3.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/misc/reactive.xml +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/readin.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/rgroup.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/scaffold.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/std.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/stereoisomers.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/tautomers.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/torsion.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/units.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/utils.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/xml.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/xtb/__init__.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/xtb/wrapper.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks.egg-info/SOURCES.txt +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks.egg-info/dependency_links.txt +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks.egg-info/requires.txt +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks.egg-info/top_level.txt +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/tests/test_basics.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/tests/test_decimals.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/tests/test_gypsumdl.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/tests/test_iupac_name.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/tests/test_nn_xtb.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/tests/test_web.py +0 -0
- {rdworks-0.36.2 → rdworks-0.36.3}/tests/test_xtb_wrapper.py +0 -0
@@ -368,56 +368,62 @@ class Mol:
|
|
368
368
|
self.confs.append(conf)
|
369
369
|
|
370
370
|
elif method.upper() == 'CONFORGE':
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
371
|
+
mol = CDPL.Chem.parseSMILES(self.smiles)
|
372
|
+
# create and initialize an instance of the class ConfGen.ConformerGenerator which
|
373
|
+
# will perform the actual conformer ensemble generation work
|
374
|
+
conf_gen = CDPL.ConfGen.ConformerGenerator()
|
375
|
+
conf_gen.settings.timeout = 60 * 1000 # 60 sec.
|
376
|
+
conf_gen.settings.minRMSD = 0.5
|
377
|
+
conf_gen.settings.energyWindow = 20.0 # kcal/mol(?)
|
378
|
+
conf_gen.settings.maxNumOutputConformers = n
|
379
|
+
# dictionary mapping status codes to human readable strings
|
380
|
+
status_to_str = {
|
381
|
+
CDPL.ConfGen.ReturnCode.UNINITIALIZED : 'uninitialized',
|
382
|
+
CDPL.ConfGen.ReturnCode.TIMEOUT : 'max. processing time exceeded',
|
383
|
+
CDPL.ConfGen.ReturnCode.ABORTED : 'aborted',
|
384
|
+
CDPL.ConfGen.ReturnCode.FORCEFIELD_SETUP_FAILED : 'force field setup failed',
|
385
|
+
CDPL.ConfGen.ReturnCode.FORCEFIELD_MINIMIZATION_FAILED : 'force field structure refinement failed',
|
386
|
+
CDPL.ConfGen.ReturnCode.FRAGMENT_LIBRARY_NOT_SET : 'fragment library not available',
|
387
|
+
CDPL.ConfGen.ReturnCode.FRAGMENT_CONF_GEN_FAILED : 'fragment conformer generation failed',
|
388
|
+
CDPL.ConfGen.ReturnCode.FRAGMENT_CONF_GEN_TIMEOUT : 'fragment conformer generation timeout',
|
389
|
+
CDPL.ConfGen.ReturnCode.FRAGMENT_ALREADY_PROCESSED : 'fragment already processed',
|
390
|
+
CDPL.ConfGen.ReturnCode.TORSION_DRIVING_FAILED : 'torsion driving failed',
|
391
|
+
CDPL.ConfGen.ReturnCode.CONF_GEN_FAILED : 'conformer generation failed',
|
392
|
+
}
|
393
|
+
|
394
|
+
# We have to create a temporary file and re-read it for storing individual conformers.
|
395
|
+
tmp_dir = os.environ.get('TMPDIR', '/tmp')
|
396
|
+
tmp_name = next(tempfile._get_candidate_names()) + '.sdf'
|
397
|
+
tmp_filename = os.path.join(tmp_dir, tmp_name)
|
398
|
+
|
399
|
+
writer = CDPL.Chem.MolecularGraphWriter(tmp_filename, "sdf" )
|
400
|
+
# SB - io.StringIO does not work with Chem.MolecularGraphWriter()
|
401
|
+
|
402
|
+
try:
|
403
|
+
# prepare the molecule for conformer generation
|
404
|
+
CDPL.ConfGen.prepareForConformerGeneration(mol)
|
405
|
+
# generate the conformer ensemble
|
406
|
+
status = conf_gen.generate(mol)
|
407
|
+
# if successful, store the generated conformer ensemble as
|
408
|
+
# per atom 3D coordinates arrays (= the way conformers are represented in CDPKit)
|
409
|
+
if status == CDPL.ConfGen.ReturnCode.SUCCESS or status == CDPL.ConfGen.ReturnCode.TOO_MUCH_SYMMETRY:
|
410
|
+
# TOO_MUCH_SYMMETRY: output ensemble may contain duplicates
|
411
|
+
conf_gen.setConformers(mol)
|
412
|
+
writer.write(mol)
|
413
|
+
writer.close()
|
414
|
+
else:
|
415
|
+
raise RuntimeError('Error: conformer generation failed: %s' % status_to_str[status])
|
416
|
+
except Exception as e:
|
417
|
+
raise RuntimeError('Error: conformer generation failed: %s' % str(e))
|
412
418
|
|
413
|
-
# tmpfile is automatically closed here
|
419
|
+
# tmpfile is automatically closed here but kept, as delete=False was set
|
414
420
|
|
415
|
-
with Chem.SDMolSupplier(
|
421
|
+
with Chem.SDMolSupplier(tmp_filename, sanitize=True, removeHs=False) as sdf:
|
416
422
|
self.confs = [ Conf(m) for m in sdf if m is not None ]
|
417
423
|
|
418
424
|
# tmpfile is not deleted here because delete=False
|
419
425
|
# we should remove the file when it is no longer needed
|
420
|
-
os.remove(
|
426
|
+
os.remove(tmp_filename)
|
421
427
|
|
422
428
|
# energy evaluations for ranking
|
423
429
|
for conf in self.confs:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|