# configuration for replica exchange scripts # run simulation: # ../make_output_dirs.sh output 64 # mpirun -np 64 -hostfile hostfile $bindir/namd2 +replicas 64 job0.conf +stdout output/%d/job0.%d.log # the number of MPI ranks (-np) must be a multiple of the number of replicas (+replicas) # to continue: # mpirun -np 64 -hostfile hostfile $bindir/namd2 +replicas 64 job1.conf +stdout output/%d/job1.%d.log # increase num_runs below if job completed, or use latest restartXXX.tcl file available # 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 19 set temperature 310 set steps_per_run 1000 set num_runs 500 # num_runs should be divisible by runs_per_frame * frames_per_restart set runs_per_frame 10 set frames_per_restart 5 set namd_config_file "AmtB_base.conf" set output_root "output/%s/AmtB-A" ; # directories must exist set pdbRoot "input/start.%d.pdb" proc replica_bias { i } { set c [expr 5.0 - $i] return [list Z "centers $c"] } proc replica_neighbors { i } { set n 19 if { $i % 2 } { set s -1 } { set s 1 } set result {} foreach dx { $s 0 -$s } { set j [expr $i + $dx] if { $j < 0 || $j >= $n } { lappend result $i ;# swap with self } { lappend result $j ;# swap with neighbor } } return $result } # the following used only by show_replicas.vmd set psf_file "input/AmtB-system.psf" set initial_pdb_file "input/start.0.pdb" set fit_pdb_file "input/start.0.pdb"