Regarding using Plumed as an external engine for OPES Metadynamics in Cp2k

132 views
Skip to first unread message

Anmol

unread,
Jun 11, 2023, 1:41:49 PM6/11/23
to cp2k
Dear users of CP2K,

I am attempting to run OPES Metadynamics in CP2K, using PLUMED as an external driver. I am encountering two problems with my setup:

Issue with temperature specification in PLUMED input file:
===================================
plumed_inupt_file
UNITS LENGTH=A ENERGY=kcal/mol TIME=fs
cv1: DISTANCE ATOMS=4,13
cv2: DISTANCE ATOMS=1,16
opes: OPES_METAD_EXPLORE ARG=cv1,cv2 PACE=20 BARRIER=50 TEMP=300
uwall: UPPER_WALLS ARG=cv1,cv2 AT=3.0,3.0 KAPPA=40,40
PRINT STRIDE=20 FILE=COLVAR ARG=*
=======================================
When I omit the temperature specification in my PLUMED input file, I receive the following error message:

PLUMED: ################################################################################
PLUMED:
PLUMED:
PLUMED: +++ PLUMED error
PLUMED: +++ at OPESmetad.cpp:379, function PLMD::opes::OPESmetad<mode>::OPESmetad(const PLMD::ActionOptions&) [with mode = PLMD::opes::exploration]
PLUMED: +++ assertion failed: kbt_>0
PLUMED: +++ message follows +++
PLUMED: your MD engine does not pass the temperature to plumed, you must specify it using TEMP
PLUMED:
PLUMED: ################################################################################

Issue with COLVAR file generation:
Interestingly, when I include the TEMP keyword in the PLUMED input file, the program runs without any errors, but it still doesn't write anything to the COLVAR file.

below is my cp2k input file
=================
&GLOBAL
  PROJECT aimtd
  RUN_TYPE MD
  PRINT_LEVEL MEDIUM
&END GLOBAL

!&EXT_RESTART
    !RESTART_FILE_NAME aimd-nvt-1.restart
!&END

&MOTION
&GEO_OPT
   OPTIMIZER LBFGS
   MAX_ITER  100
   MAX_FORCE 1.0E-03
   RMS_DR    1.0E-03
   RMS_FORCE 1.0E-03
   MAX_DR    1.0E-03
   &LBFGS
   &END
 &END

  &MD
    ENSEMBLE NVT
    TEMPERATURE 300
    TIMESTEP 0.5
    STEPS 10000
&THERMOSTAT
TYPE CSVR
&CSVR
TIMECON 1
&END CSVR
&END THERMOSTAT
  &END MD

 &PRINT
    &TRAJECTORY
      ADD_LAST NUMERIC
      FORMAT PDB
      &EACH
        MD 1
      &END EACH
    &END TRAJECTORY
   
    &RESTART
      ADD_LAST NUMERIC
      &EACH
        MD 1
      &END EACH
    &END RESTART
    &RESTART_HISTORY ON
    &END

   &FORCES
     FILENAME forces_nvt
     &EACH
     MD 1
     &END EACH
   &END FORCES

  &STRESS
     FILENAME stress_nvt
     &EACH
     MD 1
     &END EACH
   &END STRESS
   
 &END PRINT

&FREE_ENERGY
&METADYN
 USE_PLUMED .TRUE.
 PLUMED_INPUT_FILE metad_plumed.dat
&END METADYN
&END FREE_ENERGY

&END MOTION

&FORCE_EVAL
  METHOD Quickstep
  &DFT
    BASIS_SET_FILE_NAME GTH_BASIS_SET
    POTENTIAL_FILE_NAME POTENTIAL
    &QS
      EPS_DEFAULT 1.0E-07
    &END QS
    &MGRID
      CUTOFF 400
      NGRIDS 4
      REL_CUTOFF 70
    &END MGRID

    &SCF
SCF_GUESS ATOMIC
  EPS_SCF 1.0E-07
  MAX_SCF 20
  &OT ON
  MINIMIZER DIIS
  PRECONDITIONER FULL_ALL
  &END OT
  &OUTER_SCF
  MAX_SCF 100
  &END OUTER_SCF
    &END SCF

    &XC
      &XC_FUNCTIONAL
&MGGA_XC_B97M_V
&END MGGA_XC_B97M_V
      &END XC_FUNCTIONAL
      &VDW_POTENTIAL
      &NON_LOCAL
      TYPE RVV10
      &END NON_LOCAL
      &END VDW_POTENTIAL
    &END XC

  &END DFT

  &SUBSYS
    &CELL
      ABC 11.76   11.76   11.76
    &END CELL
    &TOPOLOGY
      COORD_FILE_NAME new_sys.xyz
      COORD_FILE_FORMAT XYZ
    &END TOPOLOGY
    &KIND C
        ELEMENT C
        BASIS_SET TZV2P-GTH-q4
        POTENTIAL GTH-BLYP-q4
        &END KIND
    &KIND H
        ELEMENT H
        BASIS_SET TZV2P-GTH-q1
        POTENTIAL GTH-BLYP-q1
        &END KIND
    &KIND O
        ELEMENT O
        BASIS_SET TZV2P-GTH-q6
        POTENTIAL GTH-BLYP-q6
        &END KIND

  &END SUBSYS
&END FORCE_EVAL
==========================

How to solve these two errors?

Regards
Anmol  

Ivan Gladich

unread,
Jun 12, 2023, 2:42:09 AM6/12/23
to cp2k
Hi
This is more a question for the PLUMED forum...
however, 
1) add TEMP keyword as you did
2) just add at the beginning of your plumed.dat the following
FLUSH STRIDE=1
The default in plumed is 10000 steps (if I recall well)

Hope it helps

Ivan

Anmol

unread,
Jun 12, 2023, 7:01:17 AM6/12/23
to cp...@googlegroups.com
Hi Ivan
Thanks for your suggestion. It's working fine now.
Regards
Anmol
   

--
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 on the web visit https://groups.google.com/d/msgid/cp2k/4e829a39-bf73-4d1f-8cef-7352138477d8n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages