-
Notifications
You must be signed in to change notification settings - Fork 5
/
prepare.py
62 lines (52 loc) · 1.69 KB
/
prepare.py
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import os
from calvados.cfg import Config, Job, Components
import subprocess
cwd = os.getcwd()
config = Config(
# GENERAL
sysname = 'test', # name of simulation system
box = [25., 25., 150.], # nm
temp = 293, # K
ionic = 0.15, # molar
pH = 7.0,
topol = 'slab',
# RUNTIME SETTINGS
wfreq = 1000, # dcd writing frequency, 1 = 10fs
steps = 100000, # number of simulation steps
runtime = 0, # overwrites 'steps' keyword if > 0
platform = 'CPU', # 'CUDA'
restart = None,
verbose = True,
threads = 1,
)
job = Job(
batch_sys = 'SLURM', # PBS
envname = 'calvados', # conda environment
template = 'robust.jinja',
fbash = '/home/sobuelow/.bashrc', # path to .bashrc
)
# PATH
path = f'{cwd}/{config.config["sysname"]}'
subprocess.run(f'mkdir -p {path}',shell=True)
config.write(path,name='config.yaml')
components = Components(
# Defaults
molecule_type = 'protein',
nmol = 1, # number of molecules
restraint = False, # apply restraints
restraint_type = 'harmonic',
charge_termini = 'both', # charge N or C or both
use_com = True, # center-of-mass (only if read from PDB)
colabfold = 1, # PAE format (EBI AF=0, Colabfold=1&2)
k_harmonic = 700., # Restraint force constant
# INPUT
ffasta = f'{cwd}/test.fasta', # input fasta file
fresidues = f'{cwd}/residues_C3.csv', # residue definitions
pdb_folder = f'{cwd}/pdbs', # directory for pdb and PAE files
fdomains = f'{cwd}/domains.yaml', # domain definitions (harmonic restraints)
)
components.add(name='hSUMO_hnRNPA1S', nmol=1, restraint=True)
components.add(name='Gal3', nmol=5, charge_termini='C')
components.write(path,name='components.yaml')
job.write(path,config,components,name='job.sh')
# job.submit(path,njobs=3)