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

Fix oct topology molecule name #174

Closed
wants to merge 16 commits into from
Closed
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
13 changes: 11 additions & 2 deletions mdpow/tests/test_solvation.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ def setup(tmpdir):
shutil.copy(orig, newdir.dirname)
return newdir.dirname

def solvation(setup, solvent, ff='OPLS-AA'):
def solvation(setup, solvent, ff='OPLS-AA', concentration=0):
itp = test_file[ff]
with in_dir(setup, create=False):
try:
S = sims[solvent](molecule='BNZ', forcefield=ff)
S.topology(itp=itp)
S.solvate(struct='benzene.pdb')
S.solvate(struct='benzene.pdb', concentration=concentration)
except Exception:
raise AssertionError('Solvation failed.')

Expand All @@ -60,3 +60,12 @@ def test_solvation_cyclohexane(setup):
@pytest.mark.parametrize("ff", ['OPLS-AA', 'CHARMM', 'AMBER'])
def test_solvation_wetoctanol(setup, ff):
solvation(setup, "wetoctanol", ff)

@pytest.mark.xfail(gromacs.release.startswith('4')
or gromacs.release.startswith('5')
or gromacs.release.startswith('2016'),
reason="GROMACS < 2018 cannot easily work with mixed solvents "
"(see issue #111)")
@pytest.mark.parametrize("ff", ['OPLS-AA', 'CHARMM', 'AMBER'])
def test_solvation_octanol_ion(setup, ff):
solvation(setup, "octanol", ff, concentration=0.15)
54 changes: 27 additions & 27 deletions mdpow/top/amber99sb.ff/1oct.itp
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,33 @@ SOL 3

[ atoms ]
; nr type resi res atom cgnr charge mass ; qtot bond_type
1 CT 1 OcOH C8 1 0.131400 12.01000 ; qtot 0.131
2 OH 1 OcOH O9 2 -0.599801 16.00000 ; qtot -0.468
3 H1 1 OcOH H25 3 0.019700 1.00800 ; qtot -0.449
4 H1 1 OcOH H26 4 0.019700 1.00800 ; qtot -0.429
5 HO 1 OcOH H27 5 0.398000 1.00800 ; qtot -0.031
6 CT 1 OcOH C1 6 -0.093100 12.01000 ; qtot -0.124
7 HC 1 OcOH H10 7 0.032700 1.00800 ; qtot -0.091
8 HC 1 OcOH H11 8 0.032700 1.00800 ; qtot -0.059
9 HC 1 OcOH H12 9 0.032700 1.00800 ; qtot -0.026
10 CT 1 OcOH C2 10 -0.080400 12.01000 ; qtot -0.106
11 HC 1 OcOH H13 11 0.038700 1.00800 ; qtot -0.068
12 HC 1 OcOH H14 12 0.038700 1.00800 ; qtot -0.029
13 CT 1 OcOH C3 13 -0.079400 12.01000 ; qtot -0.108
14 HC 1 OcOH H15 14 0.039700 1.00800 ; qtot -0.069
15 HC 1 OcOH H16 15 0.039700 1.00800 ; qtot -0.029
16 CT 1 OcOH C4 16 -0.079400 12.01000 ; qtot -0.108
17 HC 1 OcOH H17 17 0.038700 1.00800 ; qtot -0.070
18 HC 1 OcOH H18 18 0.038700 1.00800 ; qtot -0.031
19 CT 1 OcOH C5 19 -0.078400 12.01000 ; qtot -0.109
20 HC 1 OcOH H19 20 0.041700 1.00800 ; qtot -0.068
21 HC 1 OcOH H20 21 0.041700 1.00800 ; qtot -0.026
22 CT 1 OcOH C6 22 -0.078400 12.01000 ; qtot -0.104
23 HC 1 OcOH H21 23 0.038700 1.00800 ; qtot -0.066
24 HC 1 OcOH H22 24 0.038700 1.00800 ; qtot -0.027
25 CT 1 OcOH C7 25 -0.084400 12.01000 ; qtot -0.111
26 HC 1 OcOH H23 26 0.055700 1.00800 ; qtot -0.056
27 HC 1 OcOH H24 27 0.055700 1.00800 ; qtot 0.000
1 CT 1 SOL C8 1 0.131400 12.01000 ; qtot 0.131
2 OH 1 SOL O9 2 -0.599801 16.00000 ; qtot -0.468
3 H1 1 SOL H25 3 0.019700 1.00800 ; qtot -0.449
4 H1 1 SOL H26 4 0.019700 1.00800 ; qtot -0.429
5 HO 1 SOL H27 5 0.398000 1.00800 ; qtot -0.031
6 CT 1 SOL C1 6 -0.093100 12.01000 ; qtot -0.124
7 HC 1 SOL H10 7 0.032700 1.00800 ; qtot -0.091
8 HC 1 SOL H11 8 0.032700 1.00800 ; qtot -0.059
9 HC 1 SOL H12 9 0.032700 1.00800 ; qtot -0.026
10 CT 1 SOL C2 10 -0.080400 12.01000 ; qtot -0.106
11 HC 1 SOL H13 11 0.038700 1.00800 ; qtot -0.068
12 HC 1 SOL H14 12 0.038700 1.00800 ; qtot -0.029
13 CT 1 SOL C3 13 -0.079400 12.01000 ; qtot -0.108
14 HC 1 SOL H15 14 0.039700 1.00800 ; qtot -0.069
15 HC 1 SOL H16 15 0.039700 1.00800 ; qtot -0.029
16 CT 1 SOL C4 16 -0.079400 12.01000 ; qtot -0.108
17 HC 1 SOL H17 17 0.038700 1.00800 ; qtot -0.070
18 HC 1 SOL H18 18 0.038700 1.00800 ; qtot -0.031
19 CT 1 SOL C5 19 -0.078400 12.01000 ; qtot -0.109
20 HC 1 SOL H19 20 0.041700 1.00800 ; qtot -0.068
21 HC 1 SOL H20 21 0.041700 1.00800 ; qtot -0.026
22 CT 1 SOL C6 22 -0.078400 12.01000 ; qtot -0.104
23 HC 1 SOL H21 23 0.038700 1.00800 ; qtot -0.066
24 HC 1 SOL H22 24 0.038700 1.00800 ; qtot -0.027
25 CT 1 SOL C7 25 -0.084400 12.01000 ; qtot -0.111
26 HC 1 SOL H23 26 0.055700 1.00800 ; qtot -0.056
27 HC 1 SOL H24 27 0.055700 1.00800 ; qtot 0.000

[ bonds ]
; ai aj funct r k
Expand Down
56 changes: 28 additions & 28 deletions mdpow/top/charmm36-mar2019.ff/1oct.itp
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,34 @@ SOL 3

[ atoms ]
; nr type resnr residue atom cgnr charge mass typeB chargeB massB
; residue 1 OcOH rtp OcOH q qsum
1 CG321 1 OcOH C8 1 0.050 12.011 ;
2 OG311 1 OcOH O9 2 -0.649 15.999 ;
3 HGA2 1 OcOH H25 3 0.090 1.008 ;
4 HGA2 1 OcOH H26 4 0.090 1.008 ;
5 HGP1 1 OcOH H27 5 0.420 1.008 ;
6 CG331 1 OcOH C1 6 -0.270 12.011 ;
7 HGA3 1 OcOH H10 7 0.090 1.008 ;
8 HGA3 1 OcOH H11 8 0.090 1.008 ;
9 HGA3 1 OcOH H12 9 0.090 1.008 ;
10 CG321 1 OcOH C2 10 -0.180 12.011 ;
11 HGA2 1 OcOH H13 11 0.090 1.008 ;
12 HGA2 1 OcOH H14 12 0.090 1.008 ;
13 CG321 1 OcOH C3 13 -0.180 12.011 ;
14 HGA2 1 OcOH H15 14 0.090 1.008 ;
15 HGA2 1 OcOH H16 15 0.090 1.008 ;
16 CG321 1 OcOH C4 16 -0.180 12.011 ;
17 HGA2 1 OcOH H17 17 0.090 1.008 ;
18 HGA2 1 OcOH H18 18 0.090 1.008 ;
19 CG321 1 OcOH C5 19 -0.180 12.011 ;
20 HGA2 1 OcOH H19 20 0.090 1.008 ;
21 HGA2 1 OcOH H20 21 0.090 1.008 ;
22 CG321 1 OcOH C6 22 -0.180 12.011 ;
23 HGA2 1 OcOH H21 23 0.090 1.008 ;
24 HGA2 1 OcOH H22 24 0.090 1.008 ;
25 CG321 1 OcOH C7 25 -0.181 12.011 ;
26 HGA2 1 OcOH H23 26 0.090 1.008 ;
27 HGA2 1 OcOH H24 27 0.090 1.008 ;
; residue 1 SOL rtp SOL q qsum
1 CG321 1 SOL C8 1 0.050 12.011 ;
2 OG311 1 SOL O9 2 -0.649 15.999 ;
3 HGA2 1 SOL H25 3 0.090 1.008 ;
4 HGA2 1 SOL H26 4 0.090 1.008 ;
5 HGP1 1 SOL H27 5 0.420 1.008 ;
6 CG331 1 SOL C1 6 -0.270 12.011 ;
7 HGA3 1 SOL H10 7 0.090 1.008 ;
8 HGA3 1 SOL H11 8 0.090 1.008 ;
9 HGA3 1 SOL H12 9 0.090 1.008 ;
10 CG321 1 SOL C2 10 -0.180 12.011 ;
11 HGA2 1 SOL H13 11 0.090 1.008 ;
12 HGA2 1 SOL H14 12 0.090 1.008 ;
13 CG321 1 SOL C3 13 -0.180 12.011 ;
14 HGA2 1 SOL H15 14 0.090 1.008 ;
15 HGA2 1 SOL H16 15 0.090 1.008 ;
16 CG321 1 SOL C4 16 -0.180 12.011 ;
17 HGA2 1 SOL H17 17 0.090 1.008 ;
18 HGA2 1 SOL H18 18 0.090 1.008 ;
19 CG321 1 SOL C5 19 -0.180 12.011 ;
20 HGA2 1 SOL H19 20 0.090 1.008 ;
21 HGA2 1 SOL H20 21 0.090 1.008 ;
22 CG321 1 SOL C6 22 -0.180 12.011 ;
23 HGA2 1 SOL H21 23 0.090 1.008 ;
24 HGA2 1 SOL H22 24 0.090 1.008 ;
25 CG321 1 SOL C7 25 -0.181 12.011 ;
26 HGA2 1 SOL H23 26 0.090 1.008 ;
27 HGA2 1 SOL H24 27 0.090 1.008 ;

[ bonds ]
; ai aj funct c0 c1 c2 c3
Expand Down
54 changes: 27 additions & 27 deletions mdpow/top/oplsaa.ff/1oct.itp
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,33 @@ SOL 3

[ atoms ]
; nr type resnr residue atom cgnr charge mass typeB chargeB massB
1 opls_155 1 1OCT HO 1 0.418 1.008 ; qtot 0.418
2 opls_154 1 1OCT OH 1 -0.683 15.9994 ; qtot -0.265
3 opls_140 1 1OCT HA1 1 0.06 1.008 ; qtot -0.205
4 opls_140 1 1OCT HA2 1 0.06 1.008 ; qtot -0.145
5 opls_157 1 1OCT CA 1 0.145 12.011 ; qtot 0
6 opls_140 1 1OCT HB1 2 0.06 1.008 ; qtot 0.06
7 opls_140 1 1OCT HB2 2 0.06 1.008 ; qtot 0.12
8 opls_136 1 1OCT CB 2 -0.12 12.011 ; qtot 0
9 opls_140 1 1OCT HC1 3 0.06 1.008 ; qtot 0.06
10 opls_140 1 1OCT HC2 3 0.06 1.008 ; qtot 0.12
11 opls_136 1 1OCT CC 3 -0.12 12.011 ; qtot 0
12 opls_140 1 1OCT HD1 4 0.06 1.008 ; qtot 0.06
13 opls_140 1 1OCT HD2 4 0.06 1.008 ; qtot 0.12
14 opls_136 1 1OCT CD 4 -0.12 12.011 ; qtot 0
15 opls_140 1 1OCT HE1 5 0.06 1.008 ; qtot 0.06
16 opls_140 1 1OCT HE2 5 0.06 1.008 ; qtot 0.12
17 opls_136 1 1OCT CE 5 -0.12 12.011 ; qtot 0
18 opls_140 1 1OCT HF1 6 0.06 1.008 ; qtot 0.06
19 opls_140 1 1OCT HF2 6 0.06 1.008 ; qtot 0.12
20 opls_136 1 1OCT CF 6 -0.12 12.011 ; qtot 0
21 opls_140 1 1OCT HG1 7 0.06 1.008 ; qtot 0.06
22 opls_140 1 1OCT HG2 7 0.06 1.008 ; qtot 0.12
23 opls_136 1 1OCT CG 7 -0.12 12.011 ; qtot 0
24 opls_140 1 1OCT HH1 8 0.06 1.008 ; qtot 0.06
25 opls_140 1 1OCT HH2 8 0.06 1.008 ; qtot 0.12
26 opls_140 1 1OCT HH3 8 0.06 1.008 ; qtot 0.18
27 opls_135 1 1OCT CH 8 -0.18 12.011 ; qtot 0
1 opls_155 1 SOL HO 1 0.418 1.008 ; qtot 0.418
2 opls_154 1 SOL OH 1 -0.683 15.9994 ; qtot -0.265
3 opls_140 1 SOL HA1 1 0.06 1.008 ; qtot -0.205
4 opls_140 1 SOL HA2 1 0.06 1.008 ; qtot -0.145
5 opls_157 1 SOL CA 1 0.145 12.011 ; qtot 0
6 opls_140 1 SOL HB1 2 0.06 1.008 ; qtot 0.06
7 opls_140 1 SOL HB2 2 0.06 1.008 ; qtot 0.12
8 opls_136 1 SOL CB 2 -0.12 12.011 ; qtot 0
9 opls_140 1 SOL HC1 3 0.06 1.008 ; qtot 0.06
10 opls_140 1 SOL HC2 3 0.06 1.008 ; qtot 0.12
11 opls_136 1 SOL CC 3 -0.12 12.011 ; qtot 0
12 opls_140 1 SOL HD1 4 0.06 1.008 ; qtot 0.06
13 opls_140 1 SOL HD2 4 0.06 1.008 ; qtot 0.12
14 opls_136 1 SOL CD 4 -0.12 12.011 ; qtot 0
15 opls_140 1 SOL HE1 5 0.06 1.008 ; qtot 0.06
16 opls_140 1 SOL HE2 5 0.06 1.008 ; qtot 0.12
17 opls_136 1 SOL CE 5 -0.12 12.011 ; qtot 0
18 opls_140 1 SOL HF1 6 0.06 1.008 ; qtot 0.06
19 opls_140 1 SOL HF2 6 0.06 1.008 ; qtot 0.12
20 opls_136 1 SOL CF 6 -0.12 12.011 ; qtot 0
21 opls_140 1 SOL HG1 7 0.06 1.008 ; qtot 0.06
22 opls_140 1 SOL HG2 7 0.06 1.008 ; qtot 0.12
23 opls_136 1 SOL CG 7 -0.12 12.011 ; qtot 0
24 opls_140 1 SOL HH1 8 0.06 1.008 ; qtot 0.06
25 opls_140 1 SOL HH2 8 0.06 1.008 ; qtot 0.12
26 opls_140 1 SOL HH3 8 0.06 1.008 ; qtot 0.18
27 opls_135 1 SOL CH 8 -0.18 12.011 ; qtot 0

[ bonds ]
; ai aj funct c0 c1 c2 c3
Expand Down