[CP2K-user] Restraints in MD

Adam adam.mi... at gmail.com
Tue Apr 23 12:22:51 UTC 2019



Dear CP2K community,


I'm relatively new to CP2K so I apologise for the potentially naive 
question. I am having some difficulties getting my restraints to work in MD 
calculations and hoping somebody might be able to offer insight. 


I am trying to restrain (harmonic restraint) a molecule between a set of 
atoms, and observe the change in dynamics of the system. For this, I have 
placed a series of ghost atoms, and set restraints between my target 
molecule and the ghost atoms. 


As a test, I have tried simply to restrain an N2 molecule to a 'surface' of 
two atoms. However, as this is a non-linear system, placing the constraints 
on the ghost atoms (*i.e. *fixing XYZ of the ghost) leads to 0 total 
degrees of freedom (12 - 3 rots - 3 trans - 6 for XYZ ghost restraints). 
This doesn't quite reflect what I am trying to achieve, which is not to 
constrain the mobility of my molecule, but rather limit the mobility of a 
portion of it. 


I have therefore been searching for a way to effectively cut the ghost 
atoms out of the dynamics itself, and use them only as anchors for 
restraints. Unfortunately, I cannot seem to find a way to do this. 



Any guidance would be much appreciated!


Cheers,

Adam


=====================

&GLOBAL
  PROJECT test
  PRINT_LEVEL LOW
  RUN_TYPE MD
&END GLOBAL
&FORCE_EVAL
  METHOD QS
  &DFT
    BASIS_SET_FILE_NAME ./BASIS_MOLOPT
    POTENTIAL_FILE_NAME ./GTH_POTENTIALS
    &MGRID
      CUTOFF 300
        NGRIDS 5
    &END MGRID
    &QS
       EPS_DEFAULT 1.0E-08
       MAP_CONSISTENT
       EXTRAPOLATION ASPC
       EXTRAPOLATION_ORDER 3
    &END QS
    &SCF
      MAX_SCF 100
      EPS_SCF 1.0E-6
      SCF_GUESS ATOMIC
      &OT ON
        MINIMIZER DIIS
        N_DIIS 5
        PRECONDITIONER FULL_ALL
      &END OT
        &OUTER_SCF
        MAX_SCF 20
        &END OUTER_SCF
   &PRINT
          &RESTART_HISTORY OFF
          &END
          &RESTART
             &EACH
                QS_SCF 0
                MD 1
             &END
             ADD_LAST NUMERIC
          &END
    &END
    &END SCF
    &XC
               &VDW_POTENTIAL
                DISPERSION_FUNCTIONAL PAIR_POTENTIAL
                &PAIR_POTENTIAL
                TYPE DFTD3
                REFERENCE_FUNCTIONAL PBE
                CALCULATE_C9_TERM .TRUE.
                PARAMETER_FILE_NAME dftd3.dat
                R_CUTOFF 7.0
                &END PAIR_POTENTIAL
                &END VDW_POTENTIAL
       &XC_GRID
          XC_DERIV SPLINE2
       &END XC_GRID
      &XC_FUNCTIONAL BLYP
      &END XC_FUNCTIONAL
    &END XC
  &END DFT
  &SUBSYS
        &CELL
        ABC  20.0 20.0 20.0
        ALPHA_BETA_GAMMA 90. 90.0 90.0
        PERIODIC None
        &END CELL
        &COORD

N -3.6857888996 -1.5575299566 0.0000000000

N -3.6552471270 -0.4379381852 0.0000000000

H -5.7410666362 -2.5626012324 -0.0000000000

H -1.9555182229 -2.6256161365 -0.0000000000
        &END COORD
    &KIND N
      BASIS_SET DZVP-MOLOPT-GTH
      POTENTIAL GTH-PBE-q5
    &END KIND
    &KIND H
      GHOST
      BASIS_SET none
    &END KIND
        &COLVAR
        &DISTANCE
        ATOMS 1 4
        &END DISTANCE
        &PRINT
        &END
        &END COLVAR

        &COLVAR
        &DISTANCE
        ATOMS 2 3
        &END DISTANCE
        &PRINT
        &END
        &END COLVAR

  &END SUBSYS
&END FORCE_EVAL


&MOTION
        &CONSTRAINT
        SHAKE_TOLERANCE 1.0E-4
        &COLLECTIVE
        COLVAR 1
        INTERMOLECULAR
        TARGET [angstrom] 1.000
        &RESTRAINT
            K 1.0
        &END RESTRAINT
        &END COLLECTIVE

        &COLLECTIVE
        INTERMOLECULAR
        COLVAR 2
        TARGET [angstrom] 1.0
        &RESTRAINT
           K 1.0
        &END RESTRAINT
        &END COLLECTIVE

        &FIXED_ATOMS
           LIST 3
        &END FIXED_ATOMS
        &FIXED_ATOMS
           LIST 4
        &END FIXED_ATOMS
        &END CONSTRAINT

        &MD
        ENSEMBLE NVT
        STEPS 300
        TIMESTEP 0.5
        TEMPERATURE 300.0
&THERMOSTAT
     &NOSE
       LENGTH 3
       YOSHIDA 3
       TIMECON 1000
       MTS 2
     &END NOSE
   &END
        &END MD
                &PRINT
                &TRAJECTORY
                &EACH
                MD 1
                &END
                &END
                &VELOCITIES ON
                &END
                &RESTART
                &EACH
                MD 1
                &END
                &END
                &RESTART_HISTORY OFF
                &END
                &END
&END MOTION









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20190423/b6ac3de9/attachment.htm>


More information about the CP2K-user mailing list