From d9942d8939999f554f242638c48cd3b729f835ac Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Wed, 29 Jan 2025 16:20:31 -0500 Subject: [PATCH] Bugfixes: executable and SMILES * The configuration for the executable was not set up correctly. * There was a bug due to change in the SMILES interface for configurations. --- HISTORY.rst | 4 ++++ packmol_step/packmol.py | 6 +++--- ...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 +- 17 files changed, 42 insertions(+), 38 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 7bbf2ae..97cdb09 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,10 @@ ======= History ======= +2025.1.29 -- Bugfixes: executable and SMILES + * The configuration for the executable was not set up correctly. + * There was a bug due to change in the SMILES interface for configurations. + 2024.7.25 -- Bugfix: initial setup of packmol.ini file * The initial setup of the packmol.ini file did not add the information for Conda. This release fixes that problem. diff --git a/packmol_step/packmol.py b/packmol_step/packmol.py index 66b6d9c..79c83b8 100644 --- a/packmol_step/packmol.py +++ b/packmol_step/packmol.py @@ -247,8 +247,8 @@ def run(self): else: txt_config = Configuration(path) txt_config.add_section(executor_type) - txt_config.add_value(executor_type, "installation", "local") - txt_config.add_value(executor_type, "code", str(path)) + txt_config.set_value(executor_type, "installation", "local") + txt_config.set_value(executor_type, "code", str(path)) txt_config.save() full_config.read(ini_dir / "packmol.ini") @@ -433,7 +433,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, rdkit=True) + tmp_configuration.from_smiles(definition, flavor="openbabel") 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 ff70ed3..170b1f6 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.0309 -0.0697 -0.0322 0.0 0.0 0.0 + fixed -0.6957 2.0477 -0.1418 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 ba840be..427dcf9 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.5687 + inside sphere 0.0 0.0 0.0 14.5277 center - fixed 0.0302 -0.1685 0.0129 0.0 0.0 0.0 + fixed -0.6957 2.0477 -0.1418 0.0 0.0 0.0 number 1 end structure structure input_2.pdb - inside sphere 0.0 0.0 0.0 14.5687 - number 424 + inside sphere 0.0 0.0 0.0 14.5277 + number 421 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 5b23449..1fcf59c 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.14 Å with the solute and 424.0 solvent molecules +Created a spherical region with a diameter of 29.06 Å with the solute and 421.0 solvent molecules +-------------+------------------+---------------+----------+------------+ | Component | Structure | Requested % | Number | Actual % | |-------------+------------------+---------------+----------+------------| | solute | c1ccccc1c2ccccc2 | | 1 | | - | fluid | O | 100.000 | 424 | 100.000 | + | fluid | O | 100.000 | 421 | 100.000 | +-------------+------------------+---------------+----------+------------+ -There are a total of 1294 atoms in the cell giving a density of 0.99906 g/ml. \ No newline at end of file +There are a total of 1285 atoms in the cell giving a density of 1.0006 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 f88c3b8..dc3c17f 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 29.1850 + inside cube 0.0 0.0 0.0 28.4724 center - fixed 14.6157 14.5994 14.5991 0.0 0.0 0.0 + fixed 14.0639 16.2839 14.3271 0.0 0.0 0.0 number 1 end structure structure input_2.pdb - inside cube 0.0 0.0 0.0 29.1850 - number 822 + inside cube 0.0 0.0 0.0 28.4724 + number 763 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 5f6eac2..0cf46a8 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 29.18 Å on a side with the solute and 822.0 solvent molecules +Created a cubic region 28.47 Å on a side with the solute and 763.0 solvent molecules +-------------+------------------+---------------+----------+------------+ | Component | Structure | Requested % | Number | Actual % | |-------------+------------------+---------------+----------+------------| | solute | c1ccccc1c2ccccc2 | | 1 | | - | fluid | O | 100.000 | 822 | 100.000 | + | fluid | O | 100.000 | 763 | 100.000 | +-------------+------------------+---------------+----------+------------+ -There are a total of 2488 atoms in the cell giving a density of 0.99951 g/ml. \ No newline at end of file +There are a total of 2311 atoms in the cell giving a density of 0.99998 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 df980d3..7a94343 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 17.0750 + inside cube 1.0000 1.0000 1.0000 16.4724 center - fixed 8.5324 8.5449 8.5430 0.0 0.0 0.0 + fixed 8.0639 10.2839 8.3271 0.0 0.0 0.0 number 1 end structure structure input_2.pdb - inside cube 1.0000 1.0000 1.0000 17.0750 - number 223 + inside cube 1.0000 1.0000 1.0000 16.4724 + number 202 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 8a6c2d1..43fbb4f 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 19.08 Å on a side with the solute and 223.0 solvent molecules +Created a periodic cubic cell 18.47 Å on a side with the solute and 202.0 solvent molecules +-------------+------------------+---------------+----------+------------+ | Component | Structure | Requested % | Number | Actual % | |-------------+------------------+---------------+----------+------------| | solute | c1ccccc1c2ccccc2 | | 1 | | - | fluid | O | 100.000 | 223 | 100.000 | + | fluid | O | 100.000 | 202 | 100.000 | +-------------+------------------+---------------+----------+------------+ -There are a total of 691 atoms in the cell giving a density of 0.99807 g/ml. \ No newline at end of file +There are a total of 628 atoms in the cell giving a density of 0.9993 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 3e297cb..7a94343 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 17.1247 + inside cube 1.0000 1.0000 1.0000 16.4724 center - fixed 8.5765 8.5850 8.5614 0.0 0.0 0.0 + fixed 8.0639 10.2839 8.3271 0.0 0.0 0.0 number 1 end structure structure input_2.pdb - inside cube 1.0000 1.0000 1.0000 17.1247 - number 225 + inside cube 1.0000 1.0000 1.0000 16.4724 + number 202 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 3f3613a..43fbb4f 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 19.12 Å on a side with the solute and 225.0 solvent molecules +Created a periodic cubic cell 18.47 Å on a side with the solute and 202.0 solvent molecules +-------------+------------------+---------------+----------+------------+ | Component | Structure | Requested % | Number | Actual % | |-------------+------------------+---------------+----------+------------| | solute | c1ccccc1c2ccccc2 | | 1 | | - | fluid | O | 100.000 | 225 | 100.000 | + | fluid | O | 100.000 | 202 | 100.000 | +-------------+------------------+---------------+----------+------------+ -There are a total of 697 atoms in the cell giving a density of 0.99887 g/ml. \ No newline at end of file +There are a total of 628 atoms in the cell giving a density of 0.9993 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 066f73f..a503e84 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.6616 27.3213 40.9757 0.0 0.0 0.0 + fixed 13.4853 29.3630 41.0638 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 3f0b7bf..891da8c 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.0269 0.1283 -0.0216 0.0 0.0 0.0 + fixed -0.6957 2.0477 -0.1418 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 00a63e9..8938e50 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.7897 10.7676 10.7743 0.0 0.0 0.0 + fixed 10.6029 12.8229 10.8661 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 3921d18..0f731e1 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.7661 10.7778 10.7743 0.0 0.0 0.0 + fixed 10.6029 12.8229 10.8661 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 6fb9286..f908419 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.9959 10.0322 14.9967 0.0 0.0 0.0 + fixed 4.8276 12.0477 15.0909 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 f104191..d31fd8e 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.9805 8.9732 13.9961 0.0 0.0 0.0 + fixed 3.8276 11.0477 14.0909 0.0 0.0 0.0 number 1 end structure structure input_2.pdb