# [CP2K-user] [CP2K:16682] Problems of external potential and meta-MD wall

Bai Li lb9018409 at gmail.com
Wed Mar 9 04:06:41 UTC 2022

```Dear CP2K Users,

I want to do a MD simulation about a reaction of two molecules, where the
two molecules contain a O and a C respectively. I needed to prevent these
two atoms (O and C in two molecules respectively) moving more than 3
angstrom from each other. So I find two methods that might work, but I
don't know which one is applicative or I need to connect both of the
following methods together.

5 and 9 is the atom O and C. X0, Y0, Z0 in external potential section is
the coordinates of atom 5.
1. Using External potential section.
&EXTERNAL_POTENTIAL
ATOMS_LIST   9
FUNCTION     A*(Z-Z0)^8
PARAMETERS   A Z0
VALUES       0.001  0.347
UNITS        eV angstrom
&END
&EXTERNAL_POTENTIAL
ATOMS_LIST   9
FUNCTION     A*(X-X0)^8
PARAMETERS   A X0
VALUES       0.001  1.091
UNITS        eV angstrom
&END
&EXTERNAL_POTENTIAL
ATOMS_LIST   9
FUNCTION     A*(Y-Y0)^8
PARAMETERS   A Y0
VALUES       0.001  0.062
UNITS        eV angstrom

For the second methods, I just want to apply the Wall without doing
Meta-MD, so I close the DO_HILLS
2. Using Meta-MD Wall section.
DO_HILLS .FALSE.
NT_HILLS 10000
&METAVAR
SCALE 0.2
COLVAR 1
&WALL
POSITION [angstrom] 3.0
TYPE QUARTIC
&QUARTIC
DIRECTION WALL_PLUS
K  [kcalmol] 40.0
&END QUARTIC
&END WALL
&END METAVAR
...........
&COLVAR
&COORDINATION
ATOMS_FROM  5
ATOMS_TO   9
R_0 [angstrom]  3.0
NN  8
ND  14
&END COORDINATION
&END COLVAR
&END SUBSYS

If someone have time to give me some advices, i would appreciate it.
Best regards

Bai

--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.