Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixes: executable and SMILES #39

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions packmol_step/packmol.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
There are a total of 1285 atoms in the cell giving a density of 1.0006 g/ml.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
There are a total of 2311 atoms in the cell giving a density of 0.99998 g/ml.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
There are a total of 628 atoms in the cell giving a density of 0.9993 g/ml.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
There are a total of 628 atoms in the cell giving a density of 0.9993 g/ml.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/outputs/test_1_spherical_region.inp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/outputs/test_3_cubic_region.inp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/outputs/test_4_periodic_cubic_cell.inp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading