From e0d7b4ec8f3d2f460e286ccebf8677bfa33eb348 Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Fri, 21 Jun 2024 09:14:57 -0400 Subject: [PATCH 1/4] Switching to RDKit for SMILES since OpenBabel has some issues and is different --- packmol_step/packmol.py | 2 +- ...3\205_spherical_region_with_solvent_around_solute.inp" | 2 +- ...erical_region_with_solvent_thickness_around_solute.inp | 8 ++++---- ...erical_region_with_solvent_thickness_around_solute.out | 6 +++--- ..._cubic_region_with_solvent_thickness_around_solute.inp | 8 ++++---- ..._cubic_region_with_solvent_thickness_around_solute.out | 6 +++--- ...13_cubic_cell_with_solvent_thickness_around_solute.inp | 8 ++++---- ...13_cubic_cell_with_solvent_thickness_around_solute.out | 6 +++--- ...tangular_cell_with_solvent_thickness_around_solute.inp | 8 ++++---- ...tangular_cell_with_solvent_thickness_around_solute.out | 6 +++--- ...t_15_rectangular_cell_with_Ideal_gas_around_solute.inp | 2 +- tests/outputs/test_1_spherical_region.inp | 2 +- tests/outputs/test_3_cubic_region.inp | 2 +- tests/outputs/test_4_periodic_cubic_cell.inp | 2 +- ...est_8_10x20x30_ang_region_1k_atoms_biphenyl_solute.inp | 2 +- .../test_9_10x20x30_ang_cell_1k_atoms_biphenyl_solute.inp | 2 +- 16 files changed, 36 insertions(+), 36 deletions(-) diff --git a/packmol_step/packmol.py b/packmol_step/packmol.py index 72b2b5f..23f4345 100644 --- a/packmol_step/packmol.py +++ b/packmol_step/packmol.py @@ -389,7 +389,7 @@ def round_copies(n_copies, molecules): if source == "SMILES": tmp_system = tmp_db.create_system(name=definition) tmp_configuration = tmp_system.create_configuration(name="default") - tmp_configuration.from_smiles(definition) + tmp_configuration.from_smiles(definition, rdkit=True) if ff is not None: ff.assign_forcefield(tmp_configuration) elif source == "configuration": diff --git "a/tests/outputs/test_10_20_\303\205_spherical_region_with_solvent_around_solute.inp" "b/tests/outputs/test_10_20_\303\205_spherical_region_with_solvent_around_solute.inp" index 170b1f6..05d05de 100644 --- "a/tests/outputs/test_10_20_\303\205_spherical_region_with_solvent_around_solute.inp" +++ "b/tests/outputs/test_10_20_\303\205_spherical_region_with_solvent_around_solute.inp" @@ -5,7 +5,7 @@ connect yes structure input_1.pdb inside sphere 0.0 0.0 0.0 10.0000 center - fixed -0.6957 2.0477 -0.1418 0.0 0.0 0.0 + fixed -0.0189 -0.1051 -0.0281 0.0 0.0 0.0 number 1 end structure structure input_2.pdb diff --git a/tests/outputs/test_11_spherical_region_with_solvent_thickness_around_solute.inp b/tests/outputs/test_11_spherical_region_with_solvent_thickness_around_solute.inp index 427dcf9..e74400b 100644 --- a/tests/outputs/test_11_spherical_region_with_solvent_thickness_around_solute.inp +++ b/tests/outputs/test_11_spherical_region_with_solvent_thickness_around_solute.inp @@ -3,12 +3,12 @@ output packmol.pdb filetype pdb connect yes structure input_1.pdb - inside sphere 0.0 0.0 0.0 14.5277 + inside sphere 0.0 0.0 0.0 14.5778 center - fixed -0.6957 2.0477 -0.1418 0.0 0.0 0.0 + fixed -0.0043 -0.0362 -0.0348 0.0 0.0 0.0 number 1 end structure structure input_2.pdb - inside sphere 0.0 0.0 0.0 14.5277 - number 421 + inside sphere 0.0 0.0 0.0 14.5778 + number 425 end structure diff --git a/tests/outputs/test_11_spherical_region_with_solvent_thickness_around_solute.out b/tests/outputs/test_11_spherical_region_with_solvent_thickness_around_solute.out index 1fcf59c..6a4fbbe 100644 --- a/tests/outputs/test_11_spherical_region_with_solvent_thickness_around_solute.out +++ b/tests/outputs/test_11_spherical_region_with_solvent_thickness_around_solute.out @@ -13,13 +13,13 @@ the molecule. The number of molecules of the fluid will be obtained by using the density 1.0 g/ml. -Created a spherical region with a diameter of 29.06 Å with the solute and 421.0 solvent molecules +Created a spherical region with a diameter of 29.16 Å with the solute and 425.0 solvent molecules +-------------+------------------+---------------+----------+------------+ | Component | Structure | Requested % | Number | Actual % | |-------------+------------------+---------------+----------+------------| | solute | c1ccccc1c2ccccc2 | | 1 | | - | fluid | O | 100.000 | 421 | 100.000 | + | fluid | O | 100.000 | 425 | 100.000 | +-------------+------------------+---------------+----------+------------+ -There are a total of 1285 atoms in the cell giving a density of 1.0006 g/ml. \ No newline at end of file +There are a total of 1297 atoms in the cell giving a density of 0.99949 g/ml. \ No newline at end of file diff --git a/tests/outputs/test_12_cubic_region_with_solvent_thickness_around_solute.inp b/tests/outputs/test_12_cubic_region_with_solvent_thickness_around_solute.inp index dc3c17f..376431a 100644 --- a/tests/outputs/test_12_cubic_region_with_solvent_thickness_around_solute.inp +++ b/tests/outputs/test_12_cubic_region_with_solvent_thickness_around_solute.inp @@ -3,12 +3,12 @@ output packmol.pdb filetype pdb connect yes structure input_1.pdb - inside cube 0.0 0.0 0.0 28.4724 + inside cube 0.0 0.0 0.0 29.2609 center - fixed 14.0639 16.2839 14.3271 0.0 0.0 0.0 + fixed 14.6244 14.6137 14.6231 0.0 0.0 0.0 number 1 end structure structure input_2.pdb - inside cube 0.0 0.0 0.0 28.4724 - number 763 + inside cube 0.0 0.0 0.0 29.2609 + number 829 end structure diff --git a/tests/outputs/test_12_cubic_region_with_solvent_thickness_around_solute.out b/tests/outputs/test_12_cubic_region_with_solvent_thickness_around_solute.out index 0cf46a8..05c6fbc 100644 --- a/tests/outputs/test_12_cubic_region_with_solvent_thickness_around_solute.out +++ b/tests/outputs/test_12_cubic_region_with_solvent_thickness_around_solute.out @@ -13,13 +13,13 @@ the molecule. The number of molecules of the fluid will be obtained by using the density 1.0 g/ml. -Created a cubic region 28.47 Å on a side with the solute and 763.0 solvent molecules +Created a cubic region 29.26 Å on a side with the solute and 829.0 solvent molecules +-------------+------------------+---------------+----------+------------+ | Component | Structure | Requested % | Number | Actual % | |-------------+------------------+---------------+----------+------------| | solute | c1ccccc1c2ccccc2 | | 1 | | - | fluid | O | 100.000 | 763 | 100.000 | + | fluid | O | 100.000 | 829 | 100.000 | +-------------+------------------+---------------+----------+------------+ -There are a total of 2311 atoms in the cell giving a density of 0.99998 g/ml. \ No newline at end of file +There are a total of 2509 atoms in the cell giving a density of 1.0001 g/ml. \ No newline at end of file diff --git a/tests/outputs/test_13_cubic_cell_with_solvent_thickness_around_solute.inp b/tests/outputs/test_13_cubic_cell_with_solvent_thickness_around_solute.inp index 7a94343..ffdf96f 100644 --- a/tests/outputs/test_13_cubic_cell_with_solvent_thickness_around_solute.inp +++ b/tests/outputs/test_13_cubic_cell_with_solvent_thickness_around_solute.inp @@ -3,12 +3,12 @@ output packmol.pdb filetype pdb connect yes structure input_1.pdb - inside cube 1.0000 1.0000 1.0000 16.4724 + inside cube 1.0000 1.0000 1.0000 17.2164 center - fixed 8.0639 10.2839 8.3271 0.0 0.0 0.0 + fixed 8.6069 8.5960 8.6042 0.0 0.0 0.0 number 1 end structure structure input_2.pdb - inside cube 1.0000 1.0000 1.0000 16.4724 - number 202 + inside cube 1.0000 1.0000 1.0000 17.2164 + number 229 end structure diff --git a/tests/outputs/test_13_cubic_cell_with_solvent_thickness_around_solute.out b/tests/outputs/test_13_cubic_cell_with_solvent_thickness_around_solute.out index 43fbb4f..5691a86 100644 --- a/tests/outputs/test_13_cubic_cell_with_solvent_thickness_around_solute.out +++ b/tests/outputs/test_13_cubic_cell_with_solvent_thickness_around_solute.out @@ -13,13 +13,13 @@ the molecule. The number of molecules of the fluid will be obtained by using the density 1.0 g/ml. -Created a periodic cubic cell 18.47 Å on a side with the solute and 202.0 solvent molecules +Created a periodic cubic cell 19.22 Å on a side with the solute and 229.0 solvent molecules +-------------+------------------+---------------+----------+------------+ | Component | Structure | Requested % | Number | Actual % | |-------------+------------------+---------------+----------+------------| | solute | c1ccccc1c2ccccc2 | | 1 | | - | fluid | O | 100.000 | 202 | 100.000 | + | fluid | O | 100.000 | 229 | 100.000 | +-------------+------------------+---------------+----------+------------+ -There are a total of 628 atoms in the cell giving a density of 0.9993 g/ml. \ No newline at end of file +There are a total of 709 atoms in the cell giving a density of 1.0015 g/ml. \ No newline at end of file diff --git a/tests/outputs/test_14_rectangular_cell_with_solvent_thickness_around_solute.inp b/tests/outputs/test_14_rectangular_cell_with_solvent_thickness_around_solute.inp index 7a94343..68a8bb2 100644 --- a/tests/outputs/test_14_rectangular_cell_with_solvent_thickness_around_solute.inp +++ b/tests/outputs/test_14_rectangular_cell_with_solvent_thickness_around_solute.inp @@ -3,12 +3,12 @@ output packmol.pdb filetype pdb connect yes structure input_1.pdb - inside cube 1.0000 1.0000 1.0000 16.4724 + inside cube 1.0000 1.0000 1.0000 17.2792 center - fixed 8.0639 10.2839 8.3271 0.0 0.0 0.0 + fixed 8.6363 8.6450 8.6389 0.0 0.0 0.0 number 1 end structure structure input_2.pdb - inside cube 1.0000 1.0000 1.0000 16.4724 - number 202 + inside cube 1.0000 1.0000 1.0000 17.2792 + number 231 end structure diff --git a/tests/outputs/test_14_rectangular_cell_with_solvent_thickness_around_solute.out b/tests/outputs/test_14_rectangular_cell_with_solvent_thickness_around_solute.out index 43fbb4f..5f9bfdd 100644 --- a/tests/outputs/test_14_rectangular_cell_with_solvent_thickness_around_solute.out +++ b/tests/outputs/test_14_rectangular_cell_with_solvent_thickness_around_solute.out @@ -13,13 +13,13 @@ the molecule. The number of molecules of the fluid will be obtained by using the density 1.0 g/ml. -Created a periodic cubic cell 18.47 Å on a side with the solute and 202.0 solvent molecules +Created a periodic cubic cell 19.28 Å on a side with the solute and 231.0 solvent molecules +-------------+------------------+---------------+----------+------------+ | Component | Structure | Requested % | Number | Actual % | |-------------+------------------+---------------+----------+------------| | solute | c1ccccc1c2ccccc2 | | 1 | | - | fluid | O | 100.000 | 202 | 100.000 | + | fluid | O | 100.000 | 231 | 100.000 | +-------------+------------------+---------------+----------+------------+ -There are a total of 628 atoms in the cell giving a density of 0.9993 g/ml. \ No newline at end of file +There are a total of 715 atoms in the cell giving a density of 1.0001 g/ml. \ No newline at end of file diff --git a/tests/outputs/test_15_rectangular_cell_with_Ideal_gas_around_solute.inp b/tests/outputs/test_15_rectangular_cell_with_Ideal_gas_around_solute.inp index a503e84..662a786 100644 --- a/tests/outputs/test_15_rectangular_cell_with_Ideal_gas_around_solute.inp +++ b/tests/outputs/test_15_rectangular_cell_with_Ideal_gas_around_solute.inp @@ -5,7 +5,7 @@ connect yes structure input_1.pdb inside box 1.0000 1.0000 1.0000 25.3153 52.6305 79.9458 center - fixed 13.4853 29.3630 41.0638 0.0 0.0 0.0 + fixed 13.6630 27.3240 40.9699 0.0 0.0 0.0 number 1 end structure structure input_2.pdb diff --git a/tests/outputs/test_1_spherical_region.inp b/tests/outputs/test_1_spherical_region.inp index 891da8c..c9d00e2 100644 --- a/tests/outputs/test_1_spherical_region.inp +++ b/tests/outputs/test_1_spherical_region.inp @@ -5,7 +5,7 @@ connect yes structure input_1.pdb inside sphere 0.0 0.0 0.0 13.3688 center - fixed -0.6957 2.0477 -0.1418 0.0 0.0 0.0 + fixed -0.0074 0.0650 0.0012 0.0 0.0 0.0 number 1 end structure structure input_2.pdb diff --git a/tests/outputs/test_3_cubic_region.inp b/tests/outputs/test_3_cubic_region.inp index 8938e50..455ed7c 100644 --- a/tests/outputs/test_3_cubic_region.inp +++ b/tests/outputs/test_3_cubic_region.inp @@ -5,7 +5,7 @@ connect yes structure input_1.pdb inside cube 0.0 0.0 0.0 21.5504 center - fixed 10.6029 12.8229 10.8661 0.0 0.0 0.0 + fixed 10.7916 10.7737 10.7750 0.0 0.0 0.0 number 1 end structure structure input_2.pdb diff --git a/tests/outputs/test_4_periodic_cubic_cell.inp b/tests/outputs/test_4_periodic_cubic_cell.inp index 0f731e1..a6bfc7d 100644 --- a/tests/outputs/test_4_periodic_cubic_cell.inp +++ b/tests/outputs/test_4_periodic_cubic_cell.inp @@ -5,7 +5,7 @@ connect yes structure input_1.pdb inside cube 1.0000 1.0000 1.0000 19.5504 center - fixed 10.6029 12.8229 10.8661 0.0 0.0 0.0 + fixed 10.7627 10.7772 10.7756 0.0 0.0 0.0 number 1 end structure structure input_2.pdb diff --git a/tests/outputs/test_8_10x20x30_ang_region_1k_atoms_biphenyl_solute.inp b/tests/outputs/test_8_10x20x30_ang_region_1k_atoms_biphenyl_solute.inp index f908419..878f2e6 100644 --- a/tests/outputs/test_8_10x20x30_ang_region_1k_atoms_biphenyl_solute.inp +++ b/tests/outputs/test_8_10x20x30_ang_region_1k_atoms_biphenyl_solute.inp @@ -5,7 +5,7 @@ connect yes structure input_1.pdb inside box 0.0 0.0 0.0 10.0000 20.0000 30.0000 center - fixed 4.8276 12.0477 15.0909 0.0 0.0 0.0 + fixed 4.9978 10.0181 14.9962 0.0 0.0 0.0 number 1 end structure structure input_2.pdb diff --git a/tests/outputs/test_9_10x20x30_ang_cell_1k_atoms_biphenyl_solute.inp b/tests/outputs/test_9_10x20x30_ang_cell_1k_atoms_biphenyl_solute.inp index d31fd8e..314249c 100644 --- a/tests/outputs/test_9_10x20x30_ang_cell_1k_atoms_biphenyl_solute.inp +++ b/tests/outputs/test_9_10x20x30_ang_cell_1k_atoms_biphenyl_solute.inp @@ -5,7 +5,7 @@ connect yes structure input_1.pdb inside box 1.0000 1.0000 1.0000 8.0000 18.0000 28.0000 center - fixed 3.8276 11.0477 14.0909 0.0 0.0 0.0 + fixed 4.0105 9.0004 13.9970 0.0 0.0 0.0 number 1 end structure structure input_2.pdb From 7cdeb024ce103a6111245f3a62c1c4a6c6eb6851 Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Fri, 21 Jun 2024 09:16:56 -0400 Subject: [PATCH 2/4] Switching to RDKit for SMILES since OpenBabel has some issues and is different --- HISTORY.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 6fb2a14..7853b1e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,10 @@ ======= History ======= +2024.6.21 -- Switching to RDKit for SMILES + * Using RDKit for SMILES since we found some issues with OpenBabel, and also the + atom typing uses RDKit, so this is more compatible. + 2024.1.16 -- Adding support for containers * Added the ability to work in Docker containers. From da2e979c0e86b663bc0200dbd02ceade3c233db5 Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Fri, 21 Jun 2024 09:23:55 -0400 Subject: [PATCH 3/4] Adding missing rdkit dependency. --- devtools/conda-envs/test_env.yaml | 3 ++- requirements.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index 8c4cb82..d49b436 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -11,6 +11,7 @@ dependencies: # SEAMM - seamm - pyyaml + - rdkit - tabulate # Testing @@ -21,7 +22,7 @@ dependencies: - pytest-cov # Integration testing - - packmol==20.2.2 + # - packmol==20.2.2 # Documentation - pydata-sphinx-theme diff --git a/requirements.txt b/requirements.txt index 4b742fe..e25963d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ seamm seamm_exec +rdkit tabulate From aae55dfd16c6ee64305d68f89a9b24eef1d99bfa Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Fri, 21 Jun 2024 09:29:31 -0400 Subject: [PATCH 4/4] And dependency on seamm-installer --- devtools/conda-envs/test_env.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index d49b436..e5539ea 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -10,6 +10,7 @@ dependencies: # SEAMM - seamm + - seamm-installer - pyyaml - rdkit - tabulate