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.
Files changed (84) hide show
  1. {rdworks-0.36.2 → rdworks-0.36.3}/PKG-INFO +1 -1
  2. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/__init__.py +1 -1
  3. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/mol.py +50 -44
  4. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks.egg-info/PKG-INFO +1 -1
  5. {rdworks-0.36.2 → rdworks-0.36.3}/LICENSE +0 -0
  6. {rdworks-0.36.2 → rdworks-0.36.3}/README.md +0 -0
  7. {rdworks-0.36.2 → rdworks-0.36.3}/pyproject.toml +0 -0
  8. {rdworks-0.36.2 → rdworks-0.36.3}/setup.cfg +0 -0
  9. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/autograph/__init__.py +0 -0
  10. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/autograph/autograph.py +0 -0
  11. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/autograph/centroid.py +0 -0
  12. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/autograph/dynamictreecut.py +0 -0
  13. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/autograph/nmrclust.py +0 -0
  14. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/autograph/rckmeans.py +0 -0
  15. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/bitqt/__init__.py +0 -0
  16. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/bitqt/bitqt.py +0 -0
  17. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/conf.py +0 -0
  18. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/descriptor.py +0 -0
  19. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/display.py +0 -0
  20. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/ionized.py +0 -0
  21. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/matchedseries.py +0 -0
  22. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/mollibr.py +0 -0
  23. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/pka.py +0 -0
  24. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Asinex_fragment.xml +0 -0
  25. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Astex_RO3.xml +0 -0
  26. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Baell2010_PAINS/Baell2010A.xml +0 -0
  27. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Baell2010_PAINS/Baell2010B.xml +0 -0
  28. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Baell2010_PAINS/Baell2010C.xml +0 -0
  29. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Baell2010_PAINS/PAINS-less-than-015-hits.xml +0 -0
  30. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Baell2010_PAINS/PAINS-less-than-150-hits.xml +0 -0
  31. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Baell2010_PAINS/PAINS-more-than-150-hits.xml +0 -0
  32. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Baell2010_PAINS/makexml.py +0 -0
  33. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Brenk2008_Dundee/makexml.py +0 -0
  34. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/CNS.xml +0 -0
  35. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/BMS.xml +0 -0
  36. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/Dundee.xml +0 -0
  37. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/Glaxo.xml +0 -0
  38. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/Inpharmatica.xml +0 -0
  39. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/LINT.xml +0 -0
  40. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/MLSMR.xml +0 -0
  41. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/PAINS.xml +0 -0
  42. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/SureChEMBL.xml +0 -0
  43. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ChEMBL_Walters/makexml.py +0 -0
  44. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Hann1999_Glaxo/Hann1999.xml +0 -0
  45. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Hann1999_Glaxo/Hann1999Acid.xml +0 -0
  46. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Hann1999_Glaxo/Hann1999Base.xml +0 -0
  47. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Hann1999_Glaxo/Hann1999ElPh.xml +0 -0
  48. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Hann1999_Glaxo/Hann1999NuPh.xml +0 -0
  49. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Hann1999_Glaxo/makexml.py +0 -0
  50. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Kazius2005/Kazius2005.xml +0 -0
  51. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/Kazius2005/makexml.py +0 -0
  52. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ZINC_druglike.xml +0 -0
  53. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ZINC_fragment.xml +0 -0
  54. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ZINC_leadlike.xml +0 -0
  55. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/fragment.xml +0 -0
  56. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ionized/simple_smarts_pattern.csv +0 -0
  57. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/ionized/smarts_pattern.csv +0 -0
  58. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/misc/makexml.py +0 -0
  59. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/misc/reactive-part-2.xml +0 -0
  60. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/misc/reactive-part-3.xml +0 -0
  61. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/predefined/misc/reactive.xml +0 -0
  62. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/readin.py +0 -0
  63. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/rgroup.py +0 -0
  64. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/scaffold.py +0 -0
  65. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/std.py +0 -0
  66. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/stereoisomers.py +0 -0
  67. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/tautomers.py +0 -0
  68. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/torsion.py +0 -0
  69. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/units.py +0 -0
  70. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/utils.py +0 -0
  71. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/xml.py +0 -0
  72. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/xtb/__init__.py +0 -0
  73. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks/xtb/wrapper.py +0 -0
  74. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks.egg-info/SOURCES.txt +0 -0
  75. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks.egg-info/dependency_links.txt +0 -0
  76. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks.egg-info/requires.txt +0 -0
  77. {rdworks-0.36.2 → rdworks-0.36.3}/src/rdworks.egg-info/top_level.txt +0 -0
  78. {rdworks-0.36.2 → rdworks-0.36.3}/tests/test_basics.py +0 -0
  79. {rdworks-0.36.2 → rdworks-0.36.3}/tests/test_decimals.py +0 -0
  80. {rdworks-0.36.2 → rdworks-0.36.3}/tests/test_gypsumdl.py +0 -0
  81. {rdworks-0.36.2 → rdworks-0.36.3}/tests/test_iupac_name.py +0 -0
  82. {rdworks-0.36.2 → rdworks-0.36.3}/tests/test_nn_xtb.py +0 -0
  83. {rdworks-0.36.2 → rdworks-0.36.3}/tests/test_web.py +0 -0
  84. {rdworks-0.36.2 → rdworks-0.36.3}/tests/test_xtb_wrapper.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rdworks
3
- Version: 0.36.2
3
+ Version: 0.36.3
4
4
  Summary: Frequently used tasks built on RDKit and other tools
5
5
  Author-email: Sung-Hun Bae <sunghun.bae@gmail.com>
6
6
  Maintainer-email: Sung-Hun Bae <sunghun.bae@gmail.com>
@@ -1,4 +1,4 @@
1
- __version__ = '0.36.2'
1
+ __version__ = '0.36.3'
2
2
 
3
3
  from rdworks.conf import Conf
4
4
  from rdworks.mol import Mol
@@ -368,56 +368,62 @@ class Mol:
368
368
  self.confs.append(conf)
369
369
 
370
370
  elif method.upper() == 'CONFORGE':
371
- with tempfile.NamedTemporaryFile(suffix='.sdf', delete=False) as tmpfile:
372
- mol = CDPL.Chem.parseSMILES(self.smiles)
373
- # create and initialize an instance of the class ConfGen.ConformerGenerator which
374
- # will perform the actual conformer ensemble generation work
375
- conf_gen = CDPL.ConfGen.ConformerGenerator()
376
- conf_gen.settings.timeout = 60 * 1000 # 60 sec.
377
- conf_gen.settings.minRMSD = 0.5
378
- conf_gen.settings.energyWindow = 20.0 # kcal/mol(?)
379
- conf_gen.settings.maxNumOutputConformers = n
380
- # dictionary mapping status codes to human readable strings
381
- status_to_str = {
382
- CDPL.ConfGen.ReturnCode.UNINITIALIZED : 'uninitialized',
383
- CDPL.ConfGen.ReturnCode.TIMEOUT : 'max. processing time exceeded',
384
- CDPL.ConfGen.ReturnCode.ABORTED : 'aborted',
385
- CDPL.ConfGen.ReturnCode.FORCEFIELD_SETUP_FAILED : 'force field setup failed',
386
- CDPL.ConfGen.ReturnCode.FORCEFIELD_MINIMIZATION_FAILED : 'force field structure refinement failed',
387
- CDPL.ConfGen.ReturnCode.FRAGMENT_LIBRARY_NOT_SET : 'fragment library not available',
388
- CDPL.ConfGen.ReturnCode.FRAGMENT_CONF_GEN_FAILED : 'fragment conformer generation failed',
389
- CDPL.ConfGen.ReturnCode.FRAGMENT_CONF_GEN_TIMEOUT : 'fragment conformer generation timeout',
390
- CDPL.ConfGen.ReturnCode.FRAGMENT_ALREADY_PROCESSED : 'fragment already processed',
391
- CDPL.ConfGen.ReturnCode.TORSION_DRIVING_FAILED : 'torsion driving failed',
392
- CDPL.ConfGen.ReturnCode.CONF_GEN_FAILED : 'conformer generation failed',
393
- }
394
- writer = CDPL.Chem.MolecularGraphWriter(tmpfile.name, "sdf" )
395
- # SB - io.StringIO does not work with Chem.MolecularGraphWriter()
396
- # We have to create a temporary file and re-read it for storing individual conformers.
397
- try:
398
- # prepare the molecule for conformer generation
399
- CDPL.ConfGen.prepareForConformerGeneration(mol)
400
- # generate the conformer ensemble
401
- status = conf_gen.generate(mol)
402
- # if successful, store the generated conformer ensemble as
403
- # per atom 3D coordinates arrays (= the way conformers are represented in CDPKit)
404
- if status == CDPL.ConfGen.ReturnCode.SUCCESS or status == CDPL.ConfGen.ReturnCode.TOO_MUCH_SYMMETRY:
405
- # TOO_MUCH_SYMMETRY: output ensemble may contain duplicates
406
- conf_gen.setConformers(mol)
407
- writer.write(mol)
408
- else:
409
- raise RuntimeError('Error: conformer generation failed: %s' % status_to_str[status])
410
- except Exception as e:
411
- raise RuntimeError('Error: conformer generation failed: %s' % str(e))
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(tmpfile.name, sanitize=True, removeHs=False) as sdf:
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(tmpfile.name)
426
+ os.remove(tmp_filename)
421
427
 
422
428
  # energy evaluations for ranking
423
429
  for conf in self.confs:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rdworks
3
- Version: 0.36.2
3
+ Version: 0.36.3
4
4
  Summary: Frequently used tasks built on RDKit and other tools
5
5
  Author-email: Sung-Hun Bae <sunghun.bae@gmail.com>
6
6
  Maintainer-email: Sung-Hun Bae <sunghun.bae@gmail.com>
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