Skip to content

Commit af5f226

Browse files
authored
Merge pull request #39 from molssi-seamm/dev
Bugfixes: executable and SMILES
2 parents 074d9a7 + d9942d8 commit af5f226

17 files changed

+42
-38
lines changed

HISTORY.rst

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
=======
22
History
33
=======
4+
2025.1.29 -- Bugfixes: executable and SMILES
5+
* The configuration for the executable was not set up correctly.
6+
* There was a bug due to change in the SMILES interface for configurations.
7+
48
2024.7.25 -- Bugfix: initial setup of packmol.ini file
59
* The initial setup of the packmol.ini file did not add the information for
610
Conda. This release fixes that problem.

packmol_step/packmol.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ def run(self):
247247
else:
248248
txt_config = Configuration(path)
249249
txt_config.add_section(executor_type)
250-
txt_config.add_value(executor_type, "installation", "local")
251-
txt_config.add_value(executor_type, "code", str(path))
250+
txt_config.set_value(executor_type, "installation", "local")
251+
txt_config.set_value(executor_type, "code", str(path))
252252
txt_config.save()
253253
full_config.read(ini_dir / "packmol.ini")
254254

@@ -433,7 +433,7 @@ def round_copies(n_copies, molecules):
433433
if source == "SMILES":
434434
tmp_system = tmp_db.create_system(name=definition)
435435
tmp_configuration = tmp_system.create_configuration(name="default")
436-
tmp_configuration.from_smiles(definition, rdkit=True)
436+
tmp_configuration.from_smiles(definition, flavor="openbabel")
437437
if ff is not None:
438438
ff.assign_forcefield(tmp_configuration)
439439
elif source == "configuration":

tests/outputs/test_10_20_Å_spherical_region_with_solvent_around_solute.inp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ connect yes
55
structure input_1.pdb
66
inside sphere 0.0 0.0 0.0 10.0000
77
center
8-
fixed -0.0309 -0.0697 -0.0322 0.0 0.0 0.0
8+
fixed -0.6957 2.0477 -0.1418 0.0 0.0 0.0
99
number 1
1010
end structure
1111
structure input_2.pdb

tests/outputs/test_11_spherical_region_with_solvent_thickness_around_solute.inp

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ output packmol.pdb
33
filetype pdb
44
connect yes
55
structure input_1.pdb
6-
inside sphere 0.0 0.0 0.0 14.5687
6+
inside sphere 0.0 0.0 0.0 14.5277
77
center
8-
fixed 0.0302 -0.1685 0.0129 0.0 0.0 0.0
8+
fixed -0.6957 2.0477 -0.1418 0.0 0.0 0.0
99
number 1
1010
end structure
1111
structure input_2.pdb
12-
inside sphere 0.0 0.0 0.0 14.5687
13-
number 424
12+
inside sphere 0.0 0.0 0.0 14.5277
13+
number 421
1414
end structure

tests/outputs/test_11_spherical_region_with_solvent_thickness_around_solute.out

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
the molecule. The number of molecules of the fluid will be obtained by
1414
using the density 1.0 g/ml.
1515

16-
Created a spherical region with a diameter of 29.14 Å with the solute and 424.0 solvent molecules
16+
Created a spherical region with a diameter of 29.06 Å with the solute and 421.0 solvent molecules
1717

1818
+-------------+------------------+---------------+----------+------------+
1919
| Component | Structure | Requested % | Number | Actual % |
2020
|-------------+------------------+---------------+----------+------------|
2121
| solute | c1ccccc1c2ccccc2 | | 1 | |
22-
| fluid | O | 100.000 | 424 | 100.000 |
22+
| fluid | O | 100.000 | 421 | 100.000 |
2323
+-------------+------------------+---------------+----------+------------+
2424

25-
There are a total of 1294 atoms in the cell giving a density of 0.99906 g/ml.
25+
There are a total of 1285 atoms in the cell giving a density of 1.0006 g/ml.

tests/outputs/test_12_cubic_region_with_solvent_thickness_around_solute.inp

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ output packmol.pdb
33
filetype pdb
44
connect yes
55
structure input_1.pdb
6-
inside cube 0.0 0.0 0.0 29.1850
6+
inside cube 0.0 0.0 0.0 28.4724
77
center
8-
fixed 14.6157 14.5994 14.5991 0.0 0.0 0.0
8+
fixed 14.0639 16.2839 14.3271 0.0 0.0 0.0
99
number 1
1010
end structure
1111
structure input_2.pdb
12-
inside cube 0.0 0.0 0.0 29.1850
13-
number 822
12+
inside cube 0.0 0.0 0.0 28.4724
13+
number 763
1414
end structure

tests/outputs/test_12_cubic_region_with_solvent_thickness_around_solute.out

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
the molecule. The number of molecules of the fluid will be obtained by
1414
using the density 1.0 g/ml.
1515

16-
Created a cubic region 29.18 Å on a side with the solute and 822.0 solvent molecules
16+
Created a cubic region 28.47 Å on a side with the solute and 763.0 solvent molecules
1717

1818
+-------------+------------------+---------------+----------+------------+
1919
| Component | Structure | Requested % | Number | Actual % |
2020
|-------------+------------------+---------------+----------+------------|
2121
| solute | c1ccccc1c2ccccc2 | | 1 | |
22-
| fluid | O | 100.000 | 822 | 100.000 |
22+
| fluid | O | 100.000 | 763 | 100.000 |
2323
+-------------+------------------+---------------+----------+------------+
2424

25-
There are a total of 2488 atoms in the cell giving a density of 0.99951 g/ml.
25+
There are a total of 2311 atoms in the cell giving a density of 0.99998 g/ml.

tests/outputs/test_13_cubic_cell_with_solvent_thickness_around_solute.inp

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ output packmol.pdb
33
filetype pdb
44
connect yes
55
structure input_1.pdb
6-
inside cube 1.0000 1.0000 1.0000 17.0750
6+
inside cube 1.0000 1.0000 1.0000 16.4724
77
center
8-
fixed 8.5324 8.5449 8.5430 0.0 0.0 0.0
8+
fixed 8.0639 10.2839 8.3271 0.0 0.0 0.0
99
number 1
1010
end structure
1111
structure input_2.pdb
12-
inside cube 1.0000 1.0000 1.0000 17.0750
13-
number 223
12+
inside cube 1.0000 1.0000 1.0000 16.4724
13+
number 202
1414
end structure

tests/outputs/test_13_cubic_cell_with_solvent_thickness_around_solute.out

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
the molecule. The number of molecules of the fluid will be obtained by
1414
using the density 1.0 g/ml.
1515

16-
Created a periodic cubic cell 19.08 Å on a side with the solute and 223.0 solvent molecules
16+
Created a periodic cubic cell 18.47 Å on a side with the solute and 202.0 solvent molecules
1717

1818
+-------------+------------------+---------------+----------+------------+
1919
| Component | Structure | Requested % | Number | Actual % |
2020
|-------------+------------------+---------------+----------+------------|
2121
| solute | c1ccccc1c2ccccc2 | | 1 | |
22-
| fluid | O | 100.000 | 223 | 100.000 |
22+
| fluid | O | 100.000 | 202 | 100.000 |
2323
+-------------+------------------+---------------+----------+------------+
2424

25-
There are a total of 691 atoms in the cell giving a density of 0.99807 g/ml.
25+
There are a total of 628 atoms in the cell giving a density of 0.9993 g/ml.

tests/outputs/test_14_rectangular_cell_with_solvent_thickness_around_solute.inp

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ output packmol.pdb
33
filetype pdb
44
connect yes
55
structure input_1.pdb
6-
inside cube 1.0000 1.0000 1.0000 17.1247
6+
inside cube 1.0000 1.0000 1.0000 16.4724
77
center
8-
fixed 8.5765 8.5850 8.5614 0.0 0.0 0.0
8+
fixed 8.0639 10.2839 8.3271 0.0 0.0 0.0
99
number 1
1010
end structure
1111
structure input_2.pdb
12-
inside cube 1.0000 1.0000 1.0000 17.1247
13-
number 225
12+
inside cube 1.0000 1.0000 1.0000 16.4724
13+
number 202
1414
end structure

tests/outputs/test_14_rectangular_cell_with_solvent_thickness_around_solute.out

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
the molecule. The number of molecules of the fluid will be obtained by
1414
using the density 1.0 g/ml.
1515

16-
Created a periodic cubic cell 19.12 Å on a side with the solute and 225.0 solvent molecules
16+
Created a periodic cubic cell 18.47 Å on a side with the solute and 202.0 solvent molecules
1717

1818
+-------------+------------------+---------------+----------+------------+
1919
| Component | Structure | Requested % | Number | Actual % |
2020
|-------------+------------------+---------------+----------+------------|
2121
| solute | c1ccccc1c2ccccc2 | | 1 | |
22-
| fluid | O | 100.000 | 225 | 100.000 |
22+
| fluid | O | 100.000 | 202 | 100.000 |
2323
+-------------+------------------+---------------+----------+------------+
2424

25-
There are a total of 697 atoms in the cell giving a density of 0.99887 g/ml.
25+
There are a total of 628 atoms in the cell giving a density of 0.9993 g/ml.

tests/outputs/test_15_rectangular_cell_with_Ideal_gas_around_solute.inp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ connect yes
55
structure input_1.pdb
66
inside box 1.0000 1.0000 1.0000 25.3153 52.6305 79.9458
77
center
8-
fixed 13.6616 27.3213 40.9757 0.0 0.0 0.0
8+
fixed 13.4853 29.3630 41.0638 0.0 0.0 0.0
99
number 1
1010
end structure
1111
structure input_2.pdb

tests/outputs/test_1_spherical_region.inp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ connect yes
55
structure input_1.pdb
66
inside sphere 0.0 0.0 0.0 13.3688
77
center
8-
fixed 0.0269 0.1283 -0.0216 0.0 0.0 0.0
8+
fixed -0.6957 2.0477 -0.1418 0.0 0.0 0.0
99
number 1
1010
end structure
1111
structure input_2.pdb

tests/outputs/test_3_cubic_region.inp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ connect yes
55
structure input_1.pdb
66
inside cube 0.0 0.0 0.0 21.5504
77
center
8-
fixed 10.7897 10.7676 10.7743 0.0 0.0 0.0
8+
fixed 10.6029 12.8229 10.8661 0.0 0.0 0.0
99
number 1
1010
end structure
1111
structure input_2.pdb

tests/outputs/test_4_periodic_cubic_cell.inp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ connect yes
55
structure input_1.pdb
66
inside cube 1.0000 1.0000 1.0000 19.5504
77
center
8-
fixed 10.7661 10.7778 10.7743 0.0 0.0 0.0
8+
fixed 10.6029 12.8229 10.8661 0.0 0.0 0.0
99
number 1
1010
end structure
1111
structure input_2.pdb

tests/outputs/test_8_10x20x30_ang_region_1k_atoms_biphenyl_solute.inp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ connect yes
55
structure input_1.pdb
66
inside box 0.0 0.0 0.0 10.0000 20.0000 30.0000
77
center
8-
fixed 4.9959 10.0322 14.9967 0.0 0.0 0.0
8+
fixed 4.8276 12.0477 15.0909 0.0 0.0 0.0
99
number 1
1010
end structure
1111
structure input_2.pdb

tests/outputs/test_9_10x20x30_ang_cell_1k_atoms_biphenyl_solute.inp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ connect yes
55
structure input_1.pdb
66
inside box 1.0000 1.0000 1.0000 8.0000 18.0000 28.0000
77
center
8-
fixed 3.9805 8.9732 13.9961 0.0 0.0 0.0
8+
fixed 3.8276 11.0477 14.0909 0.0 0.0 0.0
99
number 1
1010
end structure
1111
structure input_2.pdb

0 commit comments

Comments
 (0)