From: Ramon Mendoza Uriarte (ramendoza_at_uchicago.edu)
Date: Fri Oct 23 2020 - 20:30:56 CDT

Hello JC,

Thank you for your reply and sorry about the late response.

I am using NAMD 2.12 for Linux-x86_64-MPI-smp and collective variables module, version 2016-11-28-namd-2-12.

On page 12 the tutorial points you to a directory that contains the files needed to perform a 2D-REUS simulation. From here I then followed the tutorial which is basically running the simulation with:

mpirun -np 16 namd +replicas 16 job0.conf +stdout output/%d/job0.%d.log

However, the 2D-REUS simulation uses 64 replicas and hence I changed the number of processes to 64 and the number of replicas to 64. I tried to fix the error by scaling down the number of replicas thinking the error had to do with the functions in the stretch_alanin.conf file, but I ended up with the same error:

colvars: Error: keyword "" is not supported, or not recognized in this context.
FATAL ERROR: Error in the collective variables module: exiting.

Thank you,
Ramon

stretch_alanin.conf:

# configuration for replica exchange scripts

# run simulation:
# ../make_output_dirs.sh output 64
# mpirun -np 64 -hostfile hostfile $bindir/namd2 +replicas 64 job0.conf +stdou
t output/%d/job0.%d.log
# the number of MPI ranks (-np) must be a multiple of the number of replicas (+r
eplicas)

# to continue:
# mpirun -np 64 -hostfile hostfile $bindir/namd2 +replicas 64 job1.conf +stdou
t output/%d/job1.%d.log
# increase num_runs below if job completed, or use latest restartXXX.tcl file av
ailable
# be sure to increment jobX for +stdout option on command line

# view in VMD: source job0.conf; source ../show_replicas.vmd
# add continued: source job1.conf; source ../show_replicas.vmd
# show both: vmd -e load_all.vmd

# sort into single-temperature trajectories:
# $bindir/sortreplicas output/%s/stretch_alanin.job0 64 10
# $bindir/sortreplicas output/%s/stretch_alanin.job1 64 10

set num_replicas 64
set temperature 300
set steps_per_run 1000
set num_runs 10000
# num_runs should be divisible by runs_per_frame * frames_per_restart
set runs_per_frame 10
set frames_per_restart 10
set namd_config_file "alanin_base.namd"
set output_root "output/%s/stretch_alanin" ; # directories must exist
# set input_root "input/alanin.initial.%d" ; # initial configurations

proc replica_bias { i } {
  return [list lenpot "centers [expr 9 + ($i%8)] [expr 9 + ($i/8)]"]
}

proc replica_neighbors { i } {
  set nx 8
  set ny 8
  set ix [expr $i % $nx]
  set iy [expr $i / $nx]
  if { $ix % 2 } { set sx -1 } { set sx 1 }
  if { $iy % 2 } { set sy -1 } { set sy 1 }
  set result {}
  foreach { dx dy } { $sx 0 -$sx 0 0 $sy 0 -$sy } {
    set jx [expr $ix + $dx]
    set jy [expr $iy + $dy]
    if { $jx < 0 || $jx >= $nx || $jy < 0 || $jy >= $ny } {
      lappend result $i ; # swap with self
    } {
      set j [expr $jy * $nx + $jx]
      lappend result $j
    }
  }
  return $result
}

# the following used only by show_replicas.vmd
set psf_file "alanin.psf"
set initial_pdb_file "alanin.pdb"
set fit_pdb_file "alanin.pdb"

________________________________
From: JC Gumbart <gumbart_at_physics.gatech.edu>
Sent: Thursday, October 1, 2020 8:36 AM
To: Ramon Mendoza Uriarte <ramendoza_at_uchicago.edu>
Cc: tutorial-l_at_ks.uiuc.edu <tutorial-l_at_ks.uiuc.edu>
Subject: Re: tutorial-l: One-dimensional replica-exchange umbrella sampling tutorial help

Hi Ramon,

FYI, I’m not sure if tutorial-l is monitored by very many people, unfortunately.

Can you point to the exact part of the tutorial you tried? Also include which version of NAMD AND which version of colvars is being used (this is in the log file).

Best,
JC

On Sep 29, 2020, at 7:36 PM, Ramon Mendoza Uriarte <ramendoza_at_uchicago.edu<mailto:ramendoza_at_uchicago.edu>> wrote:

Hello,

I am trying to perform the two-dimensional example that the "One-dimensional replica-exchange umbrella sampling" tutorial specifies. However, whenever I attempt the simulation, I get the following error:

colvars: Initializing a new collective variable.
colvars: # name = "lengtha"
colvars: Initializing a new "distance" component.
colvars: # componentCoeff = 1 [default]
colvars: # componentExp = 1 [default]
colvars: # period = 0 [default]
colvars: # wrapAround = 0 [default]
colvars: # scalable = on [default]
colvars: Initializing atom group "group1".
colvars: # indexGroup = "" [default]
colvars: # psfSegID = [default]
colvars: # atomsFile = "" [default]
colvars: # dummyAtom = ( 0 , 0 , 0 ) [default]
colvars: # enableForces = on [default]
colvars: # centerReference = off [default]
colvars: # rotateReference = off [default]
colvars: # enableFitGradients = on [default]
colvars: Enabling scalable calculation for group "group1".
colvars: Error: keyword "" is not supported, or not recognized in this context.
FATAL ERROR: Error in the collective variables module: exiting.

I have done a search but have yet to find the solution.
I think these are the relevant code snippets:

from colvars.conf

colvarsTrajFrequency 200

colvar {
  name lengtha
  distance {
    group1 {
      atomNumbers 1
    }
    group2 {
      atomNumbers 30
    }
  }
}

colvar {
  name lengthb
  distance {
    group1 {
      atomNumbers 36
    }
    group2 {
      atomNumbers 66
    }
  }
}

harmonic {
  name lenpot
  colvars lengtha lengthb
  centers 9.0 9.0
  forceConstant 1.0
}

from stretch_alanin.conf

proc replica_bias { i } {
  return [list lenpot "centers [expr 9 + ($i%8)] [expr 9 + ($i/8)]"]
}

Thank you,
Ramon

**
** Visit http://www.greatcircle.com/majordomo/ for more info on majordomo
**