-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbackmap_workflow.py
More file actions
46 lines (40 loc) · 1.72 KB
/
backmap_workflow.py
File metadata and controls
46 lines (40 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from backpack import mapback as mb
from backpack import writepack as wp
import default_configs as dc
import os
# checking for dependent directories
# need to update this to reflect the working code
dir_list = os.listdir()
if not 'lammps_protocols' in dir_list:
os.mkdir('lammps_protocols')
if not 'lammps-AT-config' in os.listdir('lammps_protocols'):
print('no data detected, let me fix that for ya')
test_data = mb.generate_test_data(no_monomers=30, bounds=23.471697)
bonds = mb.make_bonds(test_data)
angles = mb.make_angles(test_data)
dihedrals = mb.make_dihedrals(test_data)
mass = 17.0
hi_lo = [[-23.4711697, 23.4711697] for i in range(3)]
wp.write_lammps_input('lammps-AT-config', mb.reconfig_frame(test_data),
bonds, angles, dihedrals, hi_lo, mass)
#writing protocols/configurations
bash_filename = 'bashmap.sh'
test_modules = ['python']
wp.write_backmapping_protocol(filename=bash_filename, head_dict=dc.default_workflow_dict, threads=5, no_iter=2)
soft_timesteps = [1.00]
soft_run_nos = [20000]
wp.write_lammps_config(config_dict=dc.default_soft_dict,
filename='in.PEsoft',
initial_input='lammps-AT-config',
restart=False,
timesteps=soft_timesteps,
run_nos=soft_run_nos)
equil_timesteps = [0.025,0.08,0.25,0.5,0.75,1.0,1.25]
equil_run_nos = [100,100,100,100,100,100,20000]
wp.write_lammps_config(config_dict=dc.default_peequil_dict,
filename='in.PEequil',
restart=True,
timesteps=equil_timesteps,
run_nos=equil_run_nos)
# run the protocol
os.chdir('lammps_protocols')