Project ID: plumID:20.025
Source: OAMe_G6/plumed.dat
Originally used with PLUMED version: 2.5-dev
Stable: raw zipped stdout - stderr
Master: raw zipped stdout - stderr

# --- (0) LOAD PYTORCH ---

LOAD FILE=../code/PytorchModel.cpp

# --- (1) ATOMS DEFINITIONS and ALIGNMENT ---

HOST: GROUP ATOMS=17-212      #host atoms
LIGC: GROUP ATOMS=4-10    #carbon atoms in the ligand
l1: GROUP ATOMS=3             #ligand selected atoms
l2: GROUP ATOMS=5
l3: GROUP ATOMS=8
l4: GROUP ATOMS=10
WO: GROUP ATOMS=222-6521:3    #water oxygen atoms

WHOLEMOLECULES ENTITY0=HOST
FIT_TO_TEMPLATE STRIDE=1 REFERENCE=conf_template.pdb TYPE=OPTIMAL #coordinates alignment
lig: CENTER ATOMS=LIGC

v1: FIXEDATOM AT=2.0136,2.0136,2.0   #virtual atoms
v2: FIXEDATOM AT=2.0136,2.0136,2.25
v3: FIXEDATOM AT=2.0136,2.0136,2.5
v4: FIXEDATOM AT=2.0136,2.0136,2.75
v5: FIXEDATOM AT=2.0136,2.0136,3.0
v6: FIXEDATOM AT=2.0136,2.0136,3.25
v7: FIXEDATOM AT=2.0136,2.0136,3.5
v8: FIXEDATOM AT=2.0136,2.0136,3.75

cyl: DISTANCE ATOMS=v1,lig COMPONENTS
radius: MATHEVAL ARG=cyl.x,cyl.y FUNC=sqrt(x*x+y*y) PERIODIC=NO

# --- (2) DESCRIPTORS ---

L1: COORDINATION GROUPA=l1 GROUPB=WO SWITCH={RATIONAL D_0=0.0 R_0=0.25 NN=6 MM=10} NLIST NL_CUTOFF=1.0 NL_STRIDE=5
L2: COORDINATION GROUPA=l2 GROUPB=WO SWITCH={RATIONAL D_0=0.0 R_0=0.25 NN=6 MM=10} NLIST NL_CUTOFF=1.0 NL_STRIDE=5
L3: COORDINATION GROUPA=l3 GROUPB=WO SWITCH={RATIONAL D_0=0.0 R_0=0.25 NN=6 MM=10} NLIST NL_CUTOFF=1.0 NL_STRIDE=5
L4: COORDINATION GROUPA=l4 GROUPB=WO SWITCH={RATIONAL D_0=0.0 R_0=0.25 NN=6 MM=10} NLIST NL_CUTOFF=1.0 NL_STRIDE=5
V1: COORDINATION GROUPA=v1 GROUPB=WO SWITCH={RATIONAL D_0=0.0 R_0=0.25 NN=2 MM=6} NLIST NL_CUTOFF=1.0 NL_STRIDE=5
V2: COORDINATION GROUPA=v2 GROUPB=WO SWITCH={RATIONAL D_0=0.0 R_0=0.25 NN=2 MM=6} NLIST NL_CUTOFF=1.0 NL_STRIDE=5
V3: COORDINATION GROUPA=v3 GROUPB=WO SWITCH={RATIONAL D_0=0.0 R_0=0.25 NN=2 MM=6} NLIST NL_CUTOFF=1.0 NL_STRIDE=5
V4: COORDINATION GROUPA=v4 GROUPB=WO SWITCH={RATIONAL D_0=0.0 R_0=0.25 NN=2 MM=6} NLIST NL_CUTOFF=1.0 NL_STRIDE=5
V5: COORDINATION GROUPA=v5 GROUPB=WO SWITCH={RATIONAL D_0=0.0 R_0=0.25 NN=2 MM=6} NLIST NL_CUTOFF=1.0 NL_STRIDE=5
V6: COORDINATION GROUPA=v6 GROUPB=WO SWITCH={RATIONAL D_0=0.0 R_0=0.25 NN=2 MM=6} NLIST NL_CUTOFF=1.0 NL_STRIDE=5
V7: COORDINATION GROUPA=v7 GROUPB=WO SWITCH={RATIONAL D_0=0.0 R_0=0.25 NN=2 MM=6} NLIST NL_CUTOFF=1.0 NL_STRIDE=5
V8: COORDINATION GROUPA=v8 GROUPB=WO SWITCH={RATIONAL D_0=0.0 R_0=0.25 NN=2 MM=6} NLIST NL_CUTOFF=1.0 NL_STRIDE=5

d1: MATHEVAL ARG=L1 FUNC=(x/2.5)-1.0 PERIODIC=NO  #normalized descriptors
d2: MATHEVAL ARG=L2 FUNC=(x/2.5)-1.0 PERIODIC=NO
d3: MATHEVAL ARG=L3 FUNC=(x/2.5)-1.0 PERIODIC=NO
d4: MATHEVAL ARG=L4 FUNC=(x/2.5)-1.0 PERIODIC=NO
d5: MATHEVAL ARG=V1 FUNC=(x/2.8)-1.0 PERIODIC=NO
d6: MATHEVAL ARG=V2 FUNC=(x/2.8)-1.0 PERIODIC=NO
d7: MATHEVAL ARG=V3 FUNC=(x/2.8)-1.0 PERIODIC=NO
d8: MATHEVAL ARG=V4 FUNC=(x/2.8)-1.0 PERIODIC=NO
d9: MATHEVAL ARG=V5 FUNC=(x/2.8)-1.0 PERIODIC=NO
d10: MATHEVAL ARG=V6 FUNC=(x/2.8)-1.0 PERIODIC=NO
d11: MATHEVAL ARG=V7 FUNC=(x/2.8)-1.0 PERIODIC=NO
d12: MATHEVAL ARG=V8 FUNC=(x/2.8)-1.0 PERIODIC=NO

# --- (3) DEEP-LDA CV and other quantities ---

s: PYTORCH_MODEL MODEL=modelG6_a.pt ARG=d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12  #NN output
sw: MATHEVAL ARG=s.node-0 FUNC=x+x^3 PERIODIC=NO   #Deep-LDA CV

funnel: MATHEVAL ARG=radius,cyl.z VAR=r,z FUNC=(r+1.0*(-1.2+z))*step(-z+1.)+(r-0.2)*step(z-1.) PERIODIC=NO
UPPER_WALLS AT=0 ARG=funnel KAPPA=2000.0 LABEL=funnelwall  #funnel restraint
UPPER_WALLS AT=1.8 ARG=cyl.z KAPPA=4000.0 EXP=2 LABEL=upper_wall  #upper limit of cyl.z

ang: ANGLE ATOMS=v3,v5,6,10   #angle of a ligand's axis with z
cosang: MATHEVAL ARG=ang FUNC=cos(x) PERIODIC=NO

# --- (4) OPES  ---

OPES_METAD ...
   LABEL=opes
   ARG=cyl.z,sw
   FILE=../Kernels.data
   RESTART=NO
   STATE_RFILE=../compressed_Kernels.data
   STATE_WFILE=../compressed_Kernels.data
   STATE_WSTRIDE=50000
   PACE=500
   BARRIER=40
   WALKERS_MPI
... OPES_METAD

PRINT ARG=* STRIDE=250 FILE=COLVAR FMT=%8.4f

ENDPLUMED