diff --git a/HISTORY.rst b/HISTORY.rst index 7b14603..815e156 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.3.19 -- Updated installer for new scheme * packmol-step-installer now uses the new scheme, which supports both Conda and Docker installation. diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index 8c4cb82..e5539ea 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -10,7 +10,9 @@ dependencies: # SEAMM - seamm + - seamm-installer - pyyaml + - rdkit - tabulate # Testing @@ -21,7 +23,7 @@ dependencies: - pytest-cov # Integration testing - - packmol==20.2.2 + # - packmol==20.2.2 # Documentation - pydata-sphinx-theme diff --git a/packmol_step/packmol.py b/packmol_step/packmol.py index 4efba35..9d940db 100644 --- a/packmol_step/packmol.py +++ b/packmol_step/packmol.py @@ -421,7 +421,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/requirements.txt b/requirements.txt index 4b742fe..e25963d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ seamm seamm_exec +rdkit tabulate 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