How to Fix Bond Lengths Using SHAKE in CP2K?

71 views
Skip to first unread message

Planck

unread,
Mar 6, 2025, 10:11:23 AM3/6/25
to cp2k

I am trying to run a CP2K molecular dynamics simulation where specific bond lengths should remain fixed. Based on the documentation, SHAKE should be used, but I keep encountering errors when defining it under &CONSTRAINT or &MD.

Here is my attempt:

```
CopyEdit
&MOTION
         &CONSTRAINT
                &SHAKE
                      ATOMS 1 2
                      TYPE BOND
                &END SHAKE
         &END CONSTRAINT
&END MOTION
```

However, CP2K returns an error:


``` unknown subsection SHAKE of section CONSTRAINT```

I also tried defining SHAKE within &MD, but CP2K does not recognize that either.

What is the correct way to fix bond lengths using SHAKE in CP2K? If SHAKE is not supported in the latest versions, what alternative approach should I use?

Thank you for any suggestion and help

Marcella Iannuzzi

unread,
Mar 6, 2025, 10:36:17 AM3/6/25
to cp2k
 Hi ...

How did you find this syntax for the input?

Such a  constraint is defined through the use of collective variables in the section SUBSYS.
Then the CONSTRAINT section is as follows

&MOTION

  &CONSTRAINT

    &COLLECTIVE

      COLVAR 1

      MOLECULE 1

      TARGET 1.9275

    &END COLLECTIVE


.....


The Shake and Rattle algorithm is used to enforce it. 


Regards


Reply all
Reply to author
Forward
0 new messages