Skip to content

Commit e0d7b4e

Browse files
committed
Switching to RDKit for SMILES since OpenBabel has some issues and is different
1 parent 9048433 commit e0d7b4e

16 files changed

+36
-36
lines changed

packmol_step/packmol.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def round_copies(n_copies, molecules):
389389
if source == "SMILES":
390390
tmp_system = tmp_db.create_system(name=definition)
391391
tmp_configuration = tmp_system.create_configuration(name="default")
392-
tmp_configuration.from_smiles(definition)
392+
tmp_configuration.from_smiles(definition, rdkit=True)
393393
if ff is not None:
394394
ff.assign_forcefield(tmp_configuration)
395395
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.6957 2.0477 -0.1418 0.0 0.0 0.0
8+
fixed -0.0189 -0.1051 -0.0281 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.5277
6+
inside sphere 0.0 0.0 0.0 14.5778
77
center
8-
fixed -0.6957 2.0477 -0.1418 0.0 0.0 0.0
8+
fixed -0.0043 -0.0362 -0.0348 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.5277
13-
number 421
12+
inside sphere 0.0 0.0 0.0 14.5778
13+
number 425
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.06 Å with the solute and 421.0 solvent molecules
16+
Created a spherical region with a diameter of 29.16 Å with the solute and 425.0 solvent molecules
1717

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

25-
There are a total of 1285 atoms in the cell giving a density of 1.0006 g/ml.
25+
There are a total of 1297 atoms in the cell giving a density of 0.99949 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 28.4724
6+
inside cube 0.0 0.0 0.0 29.2609
77
center
8-
fixed 14.0639 16.2839 14.3271 0.0 0.0 0.0
8+
fixed 14.6244 14.6137 14.6231 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 28.4724
13-
number 763
12+
inside cube 0.0 0.0 0.0 29.2609
13+
number 829
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 28.47 Å on a side with the solute and 763.0 solvent molecules
16+
Created a cubic region 29.26 Å on a side with the solute and 829.0 solvent molecules
1717

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

25-
There are a total of 2311 atoms in the cell giving a density of 0.99998 g/ml.
25+
There are a total of 2509 atoms in the cell giving a density of 1.0001 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 16.4724
6+
inside cube 1.0000 1.0000 1.0000 17.2164
77
center
8-
fixed 8.0639 10.2839 8.3271 0.0 0.0 0.0
8+
fixed 8.6069 8.5960 8.6042 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 16.4724
13-
number 202
12+
inside cube 1.0000 1.0000 1.0000 17.2164
13+
number 229
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 18.47 Å on a side with the solute and 202.0 solvent molecules
16+
Created a periodic cubic cell 19.22 Å on a side with the solute and 229.0 solvent molecules
1717

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

25-
There are a total of 628 atoms in the cell giving a density of 0.9993 g/ml.
25+
There are a total of 709 atoms in the cell giving a density of 1.0015 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 16.4724
6+
inside cube 1.0000 1.0000 1.0000 17.2792
77
center
8-
fixed 8.0639 10.2839 8.3271 0.0 0.0 0.0
8+
fixed 8.6363 8.6450 8.6389 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 16.4724
13-
number 202
12+
inside cube 1.0000 1.0000 1.0000 17.2792
13+
number 231
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 18.47 Å on a side with the solute and 202.0 solvent molecules
16+
Created a periodic cubic cell 19.28 Å on a side with the solute and 231.0 solvent molecules
1717

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

25-
There are a total of 628 atoms in the cell giving a density of 0.9993 g/ml.
25+
There are a total of 715 atoms in the cell giving a density of 1.0001 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.4853 29.3630 41.0638 0.0 0.0 0.0
8+
fixed 13.6630 27.3240 40.9699 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.6957 2.0477 -0.1418 0.0 0.0 0.0
8+
fixed -0.0074 0.0650 0.0012 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.6029 12.8229 10.8661 0.0 0.0 0.0
8+
fixed 10.7916 10.7737 10.7750 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.6029 12.8229 10.8661 0.0 0.0 0.0
8+
fixed 10.7627 10.7772 10.7756 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.8276 12.0477 15.0909 0.0 0.0 0.0
8+
fixed 4.9978 10.0181 14.9962 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.8276 11.0477 14.0909 0.0 0.0 0.0
8+
fixed 4.0105 9.0004 13.9970 0.0 0.0 0.0
99
number 1
1010
end structure
1111
structure input_2.pdb

0 commit comments

Comments
 (0)