Re: Large number of simulations in parallel using replica exchange.

From: Brian Radak (brian.radak_at_gmail.com)
Date: Tue Feb 12 2019 - 10:32:28 CST

I can see why a shell script is unattractive here. The intended multiple
copy idiom is to make Tcl lists and then access the correct element with
the "myReplica" proc, which assigns a unique, zero-based integer index to
each copy.

Silly example to initialize at multiple temperatures:

<all other keywords as normal >
set tempList [list 300.0 325.0 350.0]
temperature [lindex $tempList [myReplica]]

You can also just name your files with the indices in mind and put
myReplica in the string.

HTH,
BKR

On Mon, Feb 11, 2019, 11:08 PM Giacomo Fiorin <giacomo.fiorin_at_gmail.com
wrote:

> Definitely something along those lines. Or pass environment variables to
> the script using e.g. $env(SLURM_ARRAY_TASK_ID) if using Slurm.
>
> Setting up charm++ partitions correctly takes a lot of work that may be
> too much if you just want to run a bundle of uncoupled jobs.
>
> Giacomo
>
> On Mon, Feb 11, 2019, 10:46 PM Aravinda Munasinghe <aravinda1879_at_gmail.com
> wrote:
>
>> Hi,
>> If you want only to change psf, pdb, output name and the parameter file,
>> why not simply write a bash script to iteratively create all the inputs and
>> execute 6000 simulations?.
>> Best,
>>
>> On Mon, Feb 11, 2019 at 3:54 PM Dipak Balasaheb Sanap <dipakbs_at_udel.edu>
>> wrote:
>>
>>> Hi, I have a simple problem. I need to run large number of short
>>> simulations in parallel for different systems. And, my conf file has all
>>> the parameters same except structure, coordinates, parameters and
>>> outputname. I am planning to use replica exchange with no communication
>>> among replicas so I can run all of the simulations in single command.
>>> Something like this, namd2 replica.conf +replicas 6000 which uses just
>>> exchanges variable parameters and run 6000 simulations in parallel. My
>>> question is, how can I write replica.conf file to switch the parameters.
>>> Below is my normal conf file for a single simulation and I have commented
>>> where I need to switch the variable (variable 1,2,3 and 4). I am aware that
>>> I need to use myReplica function or something like that. Thank you very
>>> much.
>>>
>>> ##########################################################
>>> #ADJUSTABLE PARAMETERS ##
>>> #############################################################
>>> # Variable 1 and 2, use different psf and pdb file for every replica
>>> structure input/cg_20_22_psfgen.psf
>>> coordinates input/cg_20_22_psfgen.pdb
>>>
>>> set temperature 310
>>> #Variable 3, choose output directory for every replica
>>> set outputname output/iteration1_0.6
>>>
>>> firsttimestep 0
>>> #############################################################
>>> ## SIMULATION PARAMETERS ##
>>> #############################################################
>>> # Input
>>> paraTypeCharmm on
>>> #Variable 4, change parameter file for every replica.
>>> parameters input/from-aa_20_22_0.6.par
>>>
>>> temperature $temperature
>>> # Force-Field Parameters
>>> exclude 1-2
>>> cutoff 30.0
>>> switching on
>>> switchdist 20.0
>>> pairlistdist 100.0
>>> hgroupcutoff 0
>>> # Integrator Parameters
>>> timestep 100.0
>>> nonbondedFreq 1
>>> stepspercycle 20
>>> dielectric 20
>>> # Constant Temperature Control
>>> langevin on
>>> langevinDamping 2.0
>>> langevinTemp $temperature
>>> langevinHydrogen off
>>> # Output
>>> outputName $outputname
>>> restartfreq 400
>>> dcdfreq 1000
>>> xstFreq 400
>>> outputEnergies 400
>>> outputPressure 400
>>> #############################################################
>>> ## EXECUTION SCRIPT ##
>>> #############################################################
>>> # Minimization
>>> minimize 2000
>>> reinitvels $temperature
>>> run 100000
>>>
>>>
>>
>> --
>> Aravinda Munasinghe,
>>
>>

This archive was generated by hypermail 2.1.6 : Sat Dec 07 2019 - 23:20:26 CST