File: gromacs_example_mm_relax.py

package info (click to toggle)
python-ase 3.26.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,484 kB
  • sloc: python: 148,112; xml: 2,728; makefile: 110; javascript: 47
file content (26 lines) | stat: -rw-r--r-- 766 bytes parent folder | download
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
"""An example for using gromacs calculator in ase.
 Atom positions are relaxed.
 A sample call:

python ./gromacs_example_mm_relax.py his.pdb
"""

import sys

from ase.calculators.gromacs import Gromacs

infile_name = sys.argv[1]

CALC_MM_RELAX = Gromacs(clean=True)
CALC_MM_RELAX.set_own_params_runs('extra_pdb2gmx_parameters', '-ignh')
CALC_MM_RELAX.set_own_params_runs('init_structure', infile_name)
CALC_MM_RELAX.generate_topology_and_g96file()
CALC_MM_RELAX.write_input()
CALC_MM_RELAX.set_own_params_runs(
    'extra_editconf_parameters', '-bt cubic -c -d 0.8'
)
CALC_MM_RELAX.run_editconf()
CALC_MM_RELAX.set_own_params_runs('extra_genbox_parameters', '-cs spc216.gro')
CALC_MM_RELAX.run_genbox()
CALC_MM_RELAX.generate_gromacs_run_file()
CALC_MM_RELAX.run()