Each curve required up to tens of thousands simulations, the results of which had to be combined together
oxDNA
, a GPU-powered simulation packagepyrla
, a job launcher we will discuss later
traj = ba.traj.LAMMPSTrajectory("linear_poly.dat", "molecular")
traj.initialise_from_folder("TRAJECTORY", "traj*")
gr_obs = ba.RDF(0.1)
gr_obs.analyse_trajectory(traj)
cogli
, a tool for the visualisation of coarse-grained systems
awk
, grep
, etc. for simple analysisbash
, spit and duct tape to glue everything together!Aim at having a single entry point
good enough
$ cd EQUILIBRATION
$ lmp -var T 1.2 < lj.in
$ python3 plot_energy.py
$ cd EQUILIBRATION
$ lmp -var T 1.2 -var steps 500000 < lj.in
$ python3 plot_energy.py
Use VMD to visualise the last.lmp
file: what do you see?
Many (polymeric) systems have constant potential energy
bash
way
#!/bin/bash
for N in 5 10 20 40 80
do
mkdir N_$N
cd N_$N
input_file=poly_$N.lmp
data_file=linear_poly_$N.dat
python3 ../linear_data_in.py $N > $data_file # create the initial data file
sed s/DATA_FILE/$data_file/ ../poly.lmp > $input_file # prepare the input file
/path/to/lmp < $input_file # launch the simulation
cd ..
done
Try it yourself in the LR/AUTOMATE/BASH
folder
#!/bin/bash
for N in 5 10 20 40 80
do
mkdir N_$N
cd N_$N
for K in 0.1 0.2 0.3 0.4
do
mkdir K_$K
cd K_$K
[...]
sed s/DATA_FILE/$data_file/ ../poly.lmp | sed s/KAPPA/$K/ > $input_file
[...]
cd ..
done
cd ..
done
or, for now, use mine, pyrla
N = 5 10 20 40 80
data_file = linear_poly_$(N).dat
CopyFrom = poly.lmp
CopyTo = poly_$(N).lmp
CopyToWrite = data_file
DirectoryStructure = N_$(N)
PreExecute = python3 $(BASE_DIR)/linear_data_in.py $(N) > $(data_file)
Execute = lmp < $(CopyTo)
ContemporaryJobs = 2
InputType = Jinja2
Try it yourself in the LR/AUTOMATE/PYRLA
folder
$ ./pyrla.py py.launch
Copy PYRLA_CLUSTER
to the cluster and login
$ module load python-3.7.2 # load Python
$ pip3 install --user jinja2 # install a required module in the user home folder
$ cd PYRLA_CLUSTER
$ python3 pyrla.py py.launch
N = 5 10 20 40 80
data_file = linear_poly_$(N).dat
name = linear_poly_$(N)
CopyFrom = poly.lmp
CopyTo = poly_$(N).lmp
CopyToWrite = data_file
CopyObjects = launch_job.pbs
InputType = Jinja2
DirectoryStructure = N_$(N)
PreExecute = python3 $(BASE_DIR)/linear_data_in.py $(N) > $(data_file)
Execute = qsub -N $(name) -o $(name).out -e $(name).err -v lmp_input="$(CopyTo)" launch_job.pbs
pyrla
uses Jinja2 (more on this in the next lesson!){{
and }}
read_data {{data_file}}
K = 0.1 0.2 0.3 0.4
CopyToWrite = data_file K # remember to put {{K}} in the input file
DirectoryStructure = N_$(N)/K_$(K)
RunConditions = float(K) < 0.4 or int(N) > 10
CopyObjects = some_file1.dat some_file2.dat
Subdirectories = CONFS RESTARTS
data_file = linear_poly_$(N).dat
boltzmann_factor = ${exp(-1 / $(T))}
K = LF bending_constants.dat
K = F 0.1 T 0.5 V +0.1
N = F 5 T 100 V *2
be careful when using conditions based on float-based generated values!
-S
and -r
switchesEXERCISE_1
)angle_coeff
)TRAJECTORY
folderRESTART
folderEXERCISE_2
)compute_Ree.py
) to obtain $R_{ee}(t)$.bash
, pyrla
) to automate