Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Constrain on collective variable

43 views
Skip to first unread message

bijaya pathak

unread,
Apr 28, 2025, 12:29:03 AMApr 28
to cp2k
Dear all,
I'm running a meta dynamics simulation on cp2k, my collective variable is distance(covalent bond  length). Previously , I've applied restrain on CV but those were intermolecular. In the present case my input file looks like follows:

&CONSTRAINT
     &COLLECTIVE
       COLVAR  1
       TARGET [angstrom] 1.8
       &RESTRAINT
         K [kcalmol] 1000
       &END RESTRAINT
    &END COLLECTIVE
But it gives an error:
"Constraint section error: you have to specify at least one of the following keywords: MOLECULE, MOLNAME or INTERMOLECULAR"

MOLECULE {Integer}
Specifies the index of the molecule kind (in input file order)on which the constraint will be applied. MOLECULE and MOLNAME keyword exclude themself mutually.

This keyword cannot be repeated and it expects precisely one integer.
MOLNAME {Word}
Specifies the name of the molecule on which the constraint will be applied.

This keyword cannot be repeated and it expects precisely one word.


I do not understand what is meant my molecule kind in the input file . Can anyone help me with the issue ? I have tried various values for the keyword as per my understanding , but it gives error stating index does not match.
Any suggestions will be appreciated.
Thanking you
Bijaya  

Muhammad Saleh

unread,
Apr 28, 2025, 3:18:59 AMApr 28
to cp...@googlegroups.com
Hi, first of all 1000 kcalmol seems to high. For your error, it means you need to specify which atom or molecule that your constrainst will be applied, something like this 

   &COLVAR
     &DISTANCE
       ATOMS 599 1008 # Atoms indexes where your constraint applied
     &END DISTANCE
    &END COLVAR

Best
MuS


--
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+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/d50aed0d-78a6-471b-9354-b7dafb5ff1a1n%40googlegroups.com.

bijaya pathak

unread,
May 5, 2025, 2:38:15 AMMay 5
to cp2k
Dear MuS,
Thank you for your suggestion.
I have defined my CV as you have suggested.  The issue is about not being able to restrain the  CV  at a particular value. As I have already stated, I need my CV within a certain value. Even with restrain as large as 1000 kcalmol, the restrain condition does not hold. I am worried that I might be making some mistake in applying the restrain on CV. So could you please suggest anything about that ? 
Thanks and Regards 
Bijaya 
Reply all
Reply to author
Forward
0 new messages