Re: [AMBER] DFTB/MM result from SQM does not match Sander?

From: Ge Song via AMBER <amber.ambermd.org>
Date: Wed, 26 Mar 2025 20:42:21 +0000

Hi Timothy,

I found that with Amber24 I can print the charges in this way! Thanks again for your help.

Best,
Ge Song
________________________________
From: Ge Song via AMBER <amber.ambermd.org>
Sent: Wednesday, March 26, 2025 4:32 PM
To: Timothy Giese <giese025.rutgers.edu>; Ge Song via AMBER <amber.ambermd.org>
Subject: Re: [AMBER] DFTB/MM result from SQM does not match Sander?

Hi Timothy,

This looks incredibly helpful! Thank you so much. But I am still struggling with where to find the printed charges. I do not see any in my output file, although the 'printcharges' has been set as True.

My input now looks like:

Production
 &cntrl
  imin=6,
  nstlim=1,
  dt=0,
  ntx=1,
  irest=0,
  cut=9999.0,
  ntb=0,
  ntwx=1,
  ntwf=1,
  ioutfm=0,
  ifqnt=1
 /
 &qmmm
  qmmask=':1-3',
  qm_theory='DFTB',
  dftb_disper=1,
  qmcharge=0,
  spin=1,
  qmshake=0,
  qm_ewald=0, qm_pme=0,
  printcharges=1,
 /

Best,
Ge Song

________________________________
From: Ge Song <g.song.duke.edu>
Sent: Wednesday, March 26, 2025 4:23 PM
To: Timothy Giese <giese025.rutgers.edu>
Subject: Re: DFTB/MM result from SQM does not match Sander?

Hi Timothy,

This looks incredibly helpful! Thank you so much. But I am still struggling with where to find the printed charges. I do not see any in my output file, although the 'printcharges' has been set as True.

Best,
Ge Song
________________________________
From: Timothy Giese <giese025.rutgers.edu>
Sent: Wednesday, March 26, 2025 12:10 PM
To: amber.ambermd.org <amber.ambermd.org>; Ge Song <g.song.duke.edu>
Subject: Re: DFTB/MM result from SQM does not match Sander?

I was able to print the charges with the following sander input file. Set imin=6, nstlim=1, dt=0.0, ntpr=1 in the &cntrl namelist, and set printcharges=1 in the &qmmm namelist. An example input file is shown below.

The imin=5 option will run each frame through the minimizer. The imin=6 option will run each frame through the MD routine. When sander is run with nstlim=0, it will evaluate a single point energy calculation; however, the MD subroutine will only print the charges if the MD step is >= 1. Therefore, the trick is to set nstlim=1 so it will take one step of dynamics, but I also set the timestep to zero, dt=0.0, so it won't move the atoms. By setting dt=0.0 and nstlim=1, the kinetic energy will appear as "not a number" NaN. This is expected — just ignore it. You can easily verify that the potential energy is unaffected by comparing it with dt=0.0,nstlim=0. By setting imin=6, one achieves the exact same effect as having used cpptraj to write each frame of the trajectory as a restart file and then running sander with imin=0 on each restart file.

Note that if your input trajectory does NOT contain velocity information (one can store velocities in the trajectory file during dynamics with ntwv=-1), then set irest=0,ntx=1 when using imin=6. If the velocity information IS stored in the input trajectory file, you could set irest=1,ntx=5 when using imin=6 if desired.

I'll have to make time to see if I can reproduce what your other observations, but I don't have the bandwidth at the moment.

Here is the input that I used for a periodic system.

title
&cntrl
      irest = 0 ! 0 = start, 1 = restart
        ntx = 1 ! 1 = start, 5 = restart
       ntxo = 1 ! read/write rst as formatted file
      iwrap = 0 ! wrap crds to unit cell
     ioutfm = 1 ! write mdcrd as netcdf
       ntpr = 1 ! mdout print freq
       ntwx = 0 ! mdcrd print freq
       ntwr = 1000000 ! rst print freq
       ntwv = 0
     nstlim = 1 ! number of time steps
       imin = 6
         dt = 0.0 ! ps/step
        ntb = 1 ! 1=periodic box
      temp0 = 0 ! target temp
        ntt = 0 ! nve=0
        ntp = 0 !0=off 1=isotropic scaling
        ntc = 2 ! 1=no shake, 2=HX constr, 3=all constr
        ntf = 2 ! 1=cpt bond E, 2=ignore HX, 3=ignore all
!noshakemask=':1'
        cut = 10.
         ig = 1010
      ifqnt = 1
/


&qmmm
    qm_theory = 'DFTB'
        qmmask = ':1'
      qmcharge = 0
          spin = 1
   dftb_disper = 1
       qmshake = 0
      qm_ewald = 1
   qmmm_switch = 1
       scfconv = 1.e-10
     verbosity = 0
  tight_p_conv = 1
  diag_routine = 0
   pseudo_diag = 1
  dftb_maxiter = 100
  printcharges = 1 !!!! print charges
/







_______________________________________________
AMBER mailing list
AMBER.ambermd.org
https://urldefense.com/v3/__http://lists.ambermd.org/mailman/listinfo/amber__;!!OToaGQ!qWQTj6V9SnnSIYMFAFZ51P6u2FubYN32KVgeyGVnq3-dgVUbaJsJRSriIsxEWpfQdj2HsoxijMn5hA$
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Mar 26 2025 - 14:00:02 PDT
Custom Search