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

[WIP] Alchemical Custom Forces + Custom Lennard-Jones Switching #431

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
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
409 changes: 407 additions & 2 deletions openmmtools/alchemy.py

Large diffs are not rendered by default.

196 changes: 196 additions & 0 deletions openmmtools/data/charmm-solvated/envi.str
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
* STREAM FILE FOR ENVIRONMENT
*

set nat ?NATC
set app
!We're exploiting what is arguably a bug in the parser. On the left hand side,
!the quotes have priority, so NAT is correctly substituted. On the right hand
!side, the ? has priority and NATC" (sic) is not a valid substitution...
if "@NAT" ne "?NATC" if @nat ne 0 set app append


READ RTF CARD @{app}
* Constructed Based on Stream File from CGenff
*
36 1

MASS -1 CCX2 12.01100 C
MASS -1 HCX2 1.00800 H
MASS -1 OCX1 15.99940 O
MASS -1 HOX1 1.00800 H
MASS -1 CCX3 12.01100 C
MASS -1 HCX3 1.00800 H
MASS -1 HT 1.00800 H
MASS -1 OT 15.99940 O
MASS -1 CLA 35.45000 CL
MASS -1 POT 39.09830 K

DEFA FIRS NONE LAST NONE
AUTO ANGLES DIHE DRUDE

RESI OCOH 0.000 ! PARAM_PENALTY=0.0000 ; CHARGE_PENALTY=0.0000
GROUP ! CHARGE CH_PENALTY
ATOM C1 CCX2 0.050 ! 0.000
ATOM H11 HCX2 0.090 ! 0.000
ATOM H12 HCX2 0.090 ! 0.000
ATOM O1 OCX1 -0.649 ! 0.000
ATOM HO1 HOX1 0.420 ! 0.000
ATOM C2 CCX2 -0.181 ! 0.000
ATOM H21 HCX2 0.090 ! 0.000
ATOM H22 HCX2 0.090 ! 0.000
ATOM C3 CCX2 -0.180 ! 0.000
ATOM H31 HCX2 0.090 ! 0.000
ATOM H32 HCX2 0.090 ! 0.000
ATOM C4 CCX2 -0.180 ! 0.000
ATOM H41 HCX2 0.090 ! 0.000
ATOM H42 HCX2 0.090 ! 0.000
ATOM C5 CCX2 -0.180 ! 0.000
ATOM H51 HCX2 0.090 ! 0.000
ATOM H52 HCX2 0.090 ! 0.000
ATOM C6 CCX2 -0.180 ! 0.000
ATOM H61 HCX2 0.090 ! 0.000
ATOM H62 HCX2 0.090 ! 0.000
ATOM C7 CCX2 -0.180 ! 0.000
ATOM H71 HCX2 0.090 ! 0.000
ATOM H72 HCX2 0.090 ! 0.000
ATOM C8 CCX3 -0.270 ! 0.000
ATOM H81 HCX3 0.090 ! 0.000
ATOM H82 HCX3 0.090 ! 0.000
ATOM H83 HCX3 0.090 ! 0.000

BOND H12 C1
BOND H31 C3
BOND H51 C5
BOND H71 C7
BOND H42 C4
BOND H22 C2
BOND H62 C6
BOND H82 C8
BOND C1 H11
BOND C1 C2
BOND C1 O1
BOND C3 C2
BOND C3 C4
BOND C3 H32
BOND C5 C4
BOND C5 C6
BOND C5 H52
BOND C7 C6
BOND C7 C8
BOND C7 H72
BOND H83 C8
BOND C2 H21
BOND C4 H41
BOND C6 H61
BOND C8 H81
BOND HO1 O1

RESI TIP3 0.000
GROUP
ATOM OH2 OT -0.834
ATOM H1 HT 0.417
ATOM H2 HT 0.417
BOND OH2 H1 OH2 H2 H1 H2 ! the last bond is needed for shake
ANGLE H1 OH2 H2 ! required
DONOR H1 OH2
DONOR H2 OH2
ACCEPTOR OH2
PATCHING FIRS NONE LAST NONE

RESI POT 1.00 ! Potassium Ion
GROUP
ATOM POT POT 1.00
PATCHING FIRST NONE LAST NONE

RESI CLA -1.00 ! Chloride Ion
GROUP
ATOM CLA CLA -1.00
PATCHING FIRST NONE LAST NONE

END

READ PARA CARD FLEX @{APP}
* PARAMETERS FOR ENVIR
*


ATOMS
MASS -1 CCX2 12.01100 ! CGENFF_PRM
MASS -1 HCX2 1.00800 ! CGENFF_PRM
MASS -1 OCX1 15.99940 ! CGENFF_PRM
MASS -1 HOX1 1.00800 ! CGENFF_PRM
MASS -1 CCX3 12.01100 ! CGENFF_PRM
MASS -1 HCX3 1.00800 ! CGENFF_PRM
MASS -1 HT 1.00800 ! CGENFF_PRM
MASS -1 OT 15.99940 ! CGENFF_PRM
MASS -1 CLA 35.45000 ! CGENFF_PRM
MASS -1 POT 39.09830 ! CGENFF_PRM


BONDS
CCX2 CCX2 222.500 1.5300 ! CGENFF_PRM
CCX2 CCX3 222.500 1.5280 ! CGENFF_PRM
CCX2 OCX1 428.000 1.4200 ! CGENFF_PRM
CCX2 HCX2 309.000 1.1110 ! CGENFF_PRM
CCX3 HCX3 322.000 1.1110 ! CGENFF_PRM
OCX1 HOX1 545.000 0.9600 ! CGENFF_PRM
HT HT 0.0 1.5139 ! CGENFF_PRM
HT OT 450.000 0.9572 ! CGENFF_PRM

ANGLES
CCX2 CCX2 CCX2 58.350 113.6000 11.160 2.5610 ! CGENFF_PRM
CCX2 CCX2 CCX3 58.000 115.0000 8.000 2.5610 ! CGENFF_PRM
CCX2 CCX2 OCX1 75.700 110.1000 ! CGENFF_PRM
CCX2 CCX2 HCX2 26.500 110.1000 22.530 2.1790 ! CGENFF_PRM
CCX3 CCX2 HCX2 34.600 110.1000 22.530 2.1790 ! CGENFF_PRM
OCX1 CCX2 HCX2 45.900 108.8900 ! CGENFF_PRM
HCX2 CCX2 HCX2 35.500 109.0000 5.400 1.8020 ! CGENFF_PRM
CCX2 CCX3 HCX3 34.600 110.1000 22.530 2.1790 ! CGENFF_PRM
HCX3 CCX3 HCX3 35.500 108.4000 5.400 1.8020 ! CGENFF_PRM
CCX2 OCX1 HOX1 50.000 106.0000 ! CGENFF_PRM
HT OT HT 55.000 104.5200 ! CGENFF_PRM

DIHEDRALS
CCX2 CCX2 CCX2 CCX2 0.0645 2 0.00 ! CGENFF_PRM
CCX2 CCX2 CCX2 CCX2 0.1497 3 180.00 ! CGENFF_PRM
CCX2 CCX2 CCX2 CCX2 0.0946 4 0.00 ! CGENFF_PRM
CCX2 CCX2 CCX2 CCX2 0.1125 5 0.00 ! CGENFF_PRM
CCX2 CCX2 CCX2 CCX3 0.1505 2 0.00 ! CGENFF_PRM
CCX2 CCX2 CCX2 CCX3 0.0813 3 180.00 ! CGENFF_PRM
CCX2 CCX2 CCX2 CCX3 0.1082 4 0.00 ! CGENFF_PRM
CCX2 CCX2 CCX2 CCX3 0.2039 5 0.00 ! CGENFF_PRM
CCX2 CCX2 CCX2 OCX1 0.1950 3 0.00 ! CGENFF_PRM
CCX2 CCX2 CCX2 HCX2 0.1950 3 0.00 ! CGENFF_PRM
CCX3 CCX2 CCX2 HCX2 0.1800 3 0.00 ! CGENFF_PRM
OCX1 CCX2 CCX2 HCX2 0.1950 3 0.00 ! CGENFF_PRM
HCX2 CCX2 CCX2 HCX2 0.2200 3 0.00 ! CGENFF_PRM
CCX2 CCX2 CCX3 HCX3 0.1600 3 0.00 ! CGENFF_PRM
HCX2 CCX2 CCX3 HCX3 0.1600 3 0.00 ! CGENFF_PRM
CCX2 CCX2 OCX1 HOX1 1.1300 1 0.00 ! CGENFF_PRM
CCX2 CCX2 OCX1 HOX1 0.1400 2 0.00 ! CGENFF_PRM
CCX2 CCX2 OCX1 HOX1 0.2400 3 0.00 ! CGENFF_PRM
HCX2 CCX2 OCX1 HOX1 0.1800 3 0.00 ! CGENFF_PRM

IMPROPERS

NONBONDED nbxmod 5 atom cdiel fshift vatom vdistance vfswitch -
cutnb 14.0 ctofnb 12.0 ctonnb 10.0 eps 1.0 e14fac 1.0 wmin 1.5
CCX2 0.0 -0.0560 2.0100 0.0 -0.0100 1.9000 ! CGENFF_PRM
HCX2 0.0 -0.0350 1.3400 ! CGENFF_PRM
OCX1 0.0 -0.1921 1.7650 ! CGENFF_PRM
HOX1 0.0 -0.0460 0.2245 ! CGENFF_PRM
CCX3 0.0 -0.0780 2.0500 0.0 -0.0100 1.9000 ! CGENFF_PRM
HCX3 0.0 -0.0240 1.3400 ! CGENFF_PRM
HT 0.0 -0.0460 0.2245 ! CGENFF_PRM
OT 0.0 -0.1521 1.7682 ! CGENFF_PRM
POT 0.0 -0.0870 1.76375 ! CGENFF_PRM
CLA 0.0 -0.1500 2.27 ! CGENFF_PRM


NBFIX
POT CLA -0.114236 4.081 ! CGENFF_PRM

HBOND CUTHB 0.5

END

Loading