gromacs package

Submodules

gromacs.gmx_cluster module

Module containing the GMX Cluster class and the command line interface.

class gromacs.gmx_cluster.GMXCluster(input_structure_path, input_traj_path, output_pdb_path, input_index_path=None, properties=None, **kwargs)[source]

Bases: object

Creates cluster structures from a given GROMACS compatible trajectory. Wrapper class for the GROMACS cluster module.

Parameters:
  • input_structure_path (str) – Path to the input structure file. File type: input. Sample file. Accepted formats: tpr, gro, g96, pdb, brk, ent.
  • input_traj_path (str) –

    Path to the GROMACS trajectory file. File type: input. Sample file. Accepted formats: xtc, trr, cpt, gro, g96, pdb, tng.

  • input_index_path (str) (Optional) –

    Path to the GROMACS index file. File type: input. Sample file. Accepted formats: ndx.

  • output_pdb_path (str) –

    Path to the output cluster file. File type: output. Sample file. Accepted formats: xtc, trr, cpt, gro, g96, pdb, tng.

  • properties (dic) –
    • fit_selection (str) - (“System”) Group where the fitting will be performed. If input_index_path provided, check the file for the accepted values. Values: System, Protein, Protein-H, C-alpha, Backbone, MainChain, MainChain+Cb, MainChain+H, SideChain, SideChain-H, Prot-Masses, non-Protein, Water, SOL, non-Water, Ion, NA, CL, Water_and_ions.
    • output_selection (str) - (“System”) Group that is going to be written in the output trajectory. If input_index_path provided, check the file for the accepted values. Values: System, Protein, Protein-H, C-alpha, Backbone, MainChain, MainChain+Cb, MainChain+H, SideChain, SideChain-H, Prot-Masses, non-Protein, Water, SOL, non-Water, Ion, NA, CL, Water_and_ions.
    • dista (bool) - (False) Use RMSD of distances instead of RMS deviation.
    • method (str) - (“linkage”) Method for cluster determination. Values: linkage, jarvis-patrick, monte-carlo, diagonalization, gromos.
    • cutoff (float) - (0.1) RMSD cut-off (nm) for two structures to be neighbor.
    • gmx_path (str) - (“gmx”) Path to the GROMACS executable binary.
    • remove_tmp (bool) - (True) [WF property] Remove temporal files.
    • restart (bool) - (False) [WF property] Do not execute if output files exist.
    • container_path (str) - (None) Container path definition.
    • container_image (str) - (‘gromacs/gromacs:latest’) Container image definition.
    • container_volume_path (str) - (‘/tmp’) Container volume path definition.
    • container_working_dir (str) - (None) Container working directory definition.
    • container_user_id (str) - (None) Container user_id definition.
    • container_shell_path (str) - (‘/bin/bash’) Path to default shell inside the container.
check_data_params(out_log, err_log)[source]

Checks all the input/output paths and parameters

launch() → int[source]

Launches the execution of the GROMACS rms module.

gromacs.gmx_cluster.main()[source]

gromacs.gmx_rms module

Module containing the GMX Rms class and the command line interface.

class gromacs.gmx_rms.GMXRms(input_structure_path, input_traj_path, output_xvg_path, input_index_path=None, properties=None, **kwargs)[source]

Bases: object

Performs a Root Mean Square deviation (RMSd) analysis from a given GROMACS compatible trajectory. Wrapper of the GROMACS rms module.

Parameters:
  • input_structure_path (str) –

    Path to the input structure file. File type: input. Sample file. Accepted formats: tpr, gro, g96, pdb, brk, ent.

  • input_traj_path (str) –

    Path to the GROMACS trajectory file. File type: input. Sample file. Accepted formats: xtc, trr, cpt, gro, g96, pdb, tng.

  • input_index_path (str) (Optional) –

    Path to the GROMACS index file. File type: input. Sample file. Accepted formats: ndx.

  • output_xvg_path (str) –

    Path to the XVG output file. File type: output. Sample file. Accepted formats: xvg.

  • properties (dic) –
    • xvg (str) - (“none”) XVG plot formatting. Values: xmgrace, xmgr, none.
    • selection (str) - (“System”) Group where the rms will be performed. If input_index_path provided, check the file for the accepted values. Values: System, Protein, Protein-H, C-alpha, Backbone, MainChain, MainChain+Cb, MainChain+H, SideChain, SideChain-H, Prot-Masses, non-Protein, Water, SOL, non-Water, Ion, NA, CL, Water_and_ions.
    • gmx_path (str) - (“gmx”) Path to the GROMACS executable binary.
    • remove_tmp (bool) - (True) [WF property] Remove temporal files.
    • restart (bool) - (False) [WF property] Do not execute if output files exist.
    • container_path (str) - (None) Container path definition.
    • container_image (str) - (‘gromacs/gromacs:latest’) Container image definition.
    • container_volume_path (str) - (‘/tmp’) Container volume path definition.
    • container_working_dir (str) - (None) Container working directory definition.
    • container_user_id (str) - (None) Container user_id definition.
    • container_shell_path (str) - (‘/bin/bash’) Path to default shell inside the container.
check_data_params(out_log, err_log)[source]

Checks all the input/output paths and parameters

launch() → int[source]

Launches the execution of the GROMACS rms module.

gromacs.gmx_rms.main()[source]

gromacs.gmx_energy module

Module containing the GMX Energy class and the command line interface.

class gromacs.gmx_energy.GMXEnergy(input_energy_path, output_xvg_path, properties=None, **kwargs)[source]

Bases: object

Extracts energy components from a given GROMACS energy file. Wrapper of the GROMACS energy module.

Parameters:
  • input_energy_path (str) –

    Path to the input EDR file. File type: input. Sample file. Accepted formats: edr.

  • output_xvg_path (str) –

    Path to the XVG output file. File type: output. Sample file. Accepted formats: xvg.

  • properties (dic) –
    • xvg (str) - (“none”) XVG plot formatting. Values: xmgrace, xmgr, none.
    • terms (list) - ([“Potential”]) Energy terms. Values: Angle, Proper-Dih., Improper-Dih., LJ-14, Coulomb-14, LJ-(SR), Coulomb-(SR), Coul.-recip., Position-Rest., Potential, Kinetic-En., Total-Energy, Temperature, Pressure, Constr.-rmsd, Box-X, Box-Y, Box-Z, Volume, Density, pV, Enthalpy, Vir-XX, Vir-XY, Vir-XZ, Vir-YX, Vir-YY, Vir-YZ, Vir-ZX, Vir-ZY, Vir-ZZ, Pres-XX, Pres-XY, Pres-XZ, Pres-YX, Pres-YY, Pres-YZ, Pres-ZX, Pres-ZY, Pres-ZZ, #Surf*SurfTen, Box-Vel-XX, Box-Vel-YY, Box-Vel-ZZ, Mu-X, Mu-Y, Mu-Z, T-Protein, T-non-Protein, Lamb-Protein, Lamb-non-Protein.
    • gmx_path (str) - (“gmx”) Path to the GROMACS executable binary.
    • remove_tmp (bool) - (True) [WF property] Remove temporal files.
    • restart (bool) - (False) [WF property] Do not execute if output files exist.
    • container_path (str) - (None) Container path definition.
    • container_image (str) - (‘gromacs/gromacs:latest’) Container image definition.
    • container_volume_path (str) - (‘/tmp’) Container volume path definition.
    • container_working_dir (str) - (None) Container working directory definition.
    • container_user_id (str) - (None) Container user_id definition.
    • container_shell_path (str) - (‘/bin/bash’) Path to default shell inside the container.
check_data_params(out_log, err_log)[source]

Checks all the input/output paths and parameters

create_instructions_file()[source]

Creates an input file using the properties file settings

launch() → int[source]

Launches the execution of the GROMACS energy module.

gromacs.gmx_energy.main()[source]

gromacs.gmx_rgyr module

Module containing the GMX Rgyr class and the command line interface.

class gromacs.gmx_rgyr.GMXRgyr(input_structure_path, input_traj_path, output_xvg_path, input_index_path=None, properties=None, **kwargs)[source]

Bases: object

Computes the radius of gyration (Rgyr) of a molecule about the x-, y- and z-axes, as a function of time, from a given GROMACS compatible trajectory. Wrapper of the GROMACS rgyr module.

Parameters:
  • input_structure_path (str) –

    Path to the input structure file. File type: input. Sample file. Accepted formats: tpr, gro, g96, pdb, brk, ent.

  • input_traj_path (str) –

    Path to the GROMACS trajectory file. File type: input. Sample file. Accepted formats: xtc, trr, cpt, gro, g96, pdb, tng.

  • input_index_path (str) (Optional) –

    Path to the GROMACS index file. File type: input. Sample file. Accepted formats: ndx.

  • output_xvg_path (str) –

    Path to the XVG output file. File type: output. Sample file. Accepted formats: xvg.

  • properties (dic) –
    • xvg (str) - (“none”) XVG plot formatting. Values: xmgrace, xmgr, none.
    • selection (str) - (“System”) Group where the rgyr will be performed. If input_index_path provided, check the file for the accepted values. Values: System, Protein, Protein-H, C-alpha, Backbone, MainChain, MainChain+Cb, MainChain+H, SideChain, SideChain-H, Prot-Masses, non-Protein, Water, SOL, non-Water, Ion, NA, CL, Water_and_ions.
    • gmx_path (str) - (“gmx”) Path to the GROMACS executable binary.
    • remove_tmp (bool) - (True) [WF property] Remove temporal files.
    • restart (bool) - (False) [WF property] Do not execute if output files exist.
    • container_path (str) - (None) Container path definition.
    • container_image (str) - (‘gromacs/gromacs:latest’) Container image definition.
    • container_volume_path (str) - (‘/tmp’) Container volume path definition.
    • container_working_dir (str) - (None) Container working directory definition.
    • container_user_id (str) - (None) Container user_id definition.
    • container_shell_path (str) - (‘/bin/bash’) Path to default shell inside the container.
check_data_params(out_log, err_log)[source]

Checks all the input/output paths and parameters

launch() → int[source]

Launches the execution of the GROMACS rgyr module.

gromacs.gmx_rgyr.main()[source]

gromacs.gmx_image module

Module containing the GMX TrjConvStr class and the command line interface.

class gromacs.gmx_image.GMXImage(input_traj_path, input_top_path, output_traj_path, input_index_path=None, properties=None, **kwargs)[source]

Bases: object

Corrects periodicity (image) from a given GROMACS compatible trajectory file. Wrapper of the GROMACS trjconv module.

Parameters:
  • input_traj_path (str) –

    Path to the GROMACS trajectory file. File type: input. Sample file. Accepted formats: xtc, trr, cpt, gro, g96, pdb, tng.

  • input_top_path (str) –

    Path to the GROMACS input topology file. File type: input. Sample file. Accepted formats: tpr, gro, g96, pdb, brk, ent.

  • input_index_path (str) (Optional) –

    Path to the GROMACS index file. File type: input. Sample file. Accepted formats: ndx.

  • output_traj_path (str) –

    Path to the output file. File type: output. Sample file. Accepted formats: xtc, trr, gro, g96, pdb, tng.

  • properties (dic) –
    • fit_selection (str) - (“System”) Group where the fitting will be performed. If input_index_path provided, check the file for the accepted values. Values: System, Protein, Protein-H, C-alpha, Backbone, MainChain, MainChain+Cb, MainChain+H, SideChain, SideChain-H, Prot-Masses, non-Protein, Water, SOL, non-Water, Ion, NA, CL, Water_and_ions.
    • center_selection (str) - (“System”) Group where the trjconv will be performed. If input_index_path provided, check the file for the accepted values. Values: System, Protein, Protein-H, C-alpha, Backbone, MainChain, MainChain+Cb, MainChain+H, SideChain, SideChain-H, Prot-Masses, non-Protein, Water, SOL, non-Water, Ion, NA, CL, Water_and_ions.
    • output_selection (str) - (“System”) Group that is going to be written in the output trajectory. If input_index_path provided, check the file for the accepted values. Values: System, Protein, Protein-H, C-alpha, Backbone, MainChain, MainChain+Cb, MainChain+H, SideChain, SideChain-H, Prot-Masses, non-Protein, Water, SOL, non-Water, Ion, NA, CL, Water_and_ions.
    • pbc (str) - (“mol”) PBC treatment (see help text for full description). Values: none, mol, res, atom, nojump, cluster, whole.
    • center (bool) - (True) Center atoms in box.
    • ur (str) - (“compact”) Unit-cell representation. Values: rect, tric, compact.
    • fit (str) - (“none”) Fit molecule to ref structure in the structure file. Values: none, rot+trans, rotxy+transxy, translation, transxy, progressive.
    • gmx_path (str) - (“gmx”) Path to the GROMACS executable binary.
    • remove_tmp (bool) - (True) [WF property] Remove temporal files.
    • restart (bool) - (False) [WF property] Do not execute if output files exist.
    • container_path (str) - (None) Container path definition.
    • container_image (str) - (‘gromacs/gromacs:latest’) Container image definition.
    • container_volume_path (str) - (‘/tmp’) Container volume path definition.
    • container_working_dir (str) - (None) Container working directory definition.
    • container_user_id (str) - (None) Container user_id definition.
    • container_shell_path (str) - (‘/bin/bash’) Path to default shell inside the container.
check_data_params(out_log, err_log)[source]

Checks all the input/output paths and parameters

launch() → int[source]

Launches the execution of the GROMACS rgyr module.

gromacs.gmx_image.main()[source]

gromacs.gmx_trjconv_str module

Module containing the GMX TrjConvStr class and the command line interface.

class gromacs.gmx_trjconv_str.GMXTrjConvStr(input_structure_path, input_top_path, output_str_path, input_index_path=None, properties=None, **kwargs)[source]

Bases: object

Converts between GROMACS compatible structure file formats and/or extracts a selection of atoms. Wrapper of the GROMACS trjconv module.

Parameters:
  • input_structure_path (str) –

    Path to the input structure file. File type: input. Sample file. Accepted formats: xtc, trr, cpt, gro, g96, pdb, tng.

  • input_top_path (str) –

    Path to the GROMACS input topology file. File type: input. Sample file. Accepted formats: tpr, gro, g96, pdb, brk, ent.

  • input_index_path (str) (Optional) –

    Path to the GROMACS index file. File type: input. Sample file. Accepted formats: ndx.

  • output_str_path (str) –

    Path to the output file. File type: output. Sample file. Accepted formats: xtc, trr, gro, g96, pdb, tng.

  • properties (dic) –
    • selection (str) - (“System”) Group where the trjconv will be performed. If input_index_path provided, check the file for the accepted values. Values: System, Protein, Protein-H, C-alpha, Backbone, MainChain, MainChain+Cb, MainChain+H, SideChain, SideChain-H, Prot-Masses, non-Protein, Water, SOL, non-Water, Ion, NA, CL, Water_and_ions.
    • gmx_path (str) - (“gmx”) Path to the GROMACS executable binary.
    • remove_tmp (bool) - (True) [WF property] Remove temporal files.
    • restart (bool) - (False) [WF property] Do not execute if output files exist.
    • container_path (str) - (None) Container path definition.
    • container_image (str) - (‘gromacs/gromacs:latest’) Container image definition.
    • container_volume_path (str) - (‘/tmp’) Container volume path definition.
    • container_working_dir (str) - (None) Container working directory definition.
    • container_user_id (str) - (None) Container user_id definition.
    • container_shell_path (str) - (‘/bin/bash’) Path to default shell inside the container.
check_data_params(out_log, err_log)[source]

Checks all the input/output paths and parameters

launch() → int[source]

Launches the execution of the GROMACS rgyr module.

gromacs.gmx_trjconv_str.main()[source]

gromacs.gmx_trjconv_str_ens module

Module containing the GMX TrjConvStr class and the command line interface.

class gromacs.gmx_trjconv_str_ens.GMXTrjConvStrEns(input_traj_path, input_top_path, output_str_ens_path, input_index_path=None, properties=None, **kwargs)[source]

Bases: object

Extracts an ensemble of frames containing a selection of atoms from GROMACS compatible trajectory files. Wrapper of the GROMACS trjconv module.

Parameters:
  • input_traj_path (str) –

    Path to the GROMACS trajectory file. File type: input. Sample file. Accepted formats: xtc, trr, cpt, gro, g96, pdb, tng.

  • input_top_path (str) –

    Path to the GROMACS input topology file. File type: input. Sample file. Accepted formats: tpr, gro, g96, pdb, brk, ent.

  • input_index_path (str) (Optional) –

    Path to the GROMACS index file. File type: input. Sample file. Accepted formats: ndx.

  • output_str_ens_path (str) –

    Path to the output file. File type: output. Sample file. Accepted formats: zip.

  • properties (dic) –
    • selection (str) - (“System”) Group where the trjconv will be performed. If input_index_path provided, check the file for the accepted values. Values: System, Protein, Protein-H, C-alpha, Backbone, MainChain, MainChain+Cb, MainChain+H, SideChain, SideChain-H, Prot-Masses, non-Protein, Water, SOL, non-Water, Ion, NA, CL, Water_and_ions.
    • skip (int) - (1) Only write every nr-th frame.
    • start (int) - (0) Time of first frame to read from trajectory (default unit ps).
    • end (int) - (0) Time of last frame to read from trajectory (default unit ps).
    • dt (int) - (0) Only write frame when t MOD dt = first time (ps).
    • output_name (str) - (“output”) File name for ensemble of output files.
    • output_type (str) - (“pdb”) File type for ensemble of output files. Values: gro, g96, pdb.
    • gmx_path (str) - (“gmx”) Path to the GROMACS executable binary.
    • remove_tmp (bool) - (True) [WF property] Remove temporal files.
    • restart (bool) - (False) [WF property] Do not execute if output files exist.
    • container_path (str) - (None) Container path definition.
    • container_image (str) - (‘gromacs/gromacs:latest’) Container image definition.
    • container_volume_path (str) - (‘/tmp’) Container volume path definition.
    • container_working_dir (str) - (None) Container working directory definition.
    • container_user_id (str) - (None) Container user_id definition.
    • container_shell_path (str) - (‘/bin/bash’) Path to default shell inside the container.
check_data_params(out_log, err_log)[source]

Checks all the input/output paths and parameters

launch() → int[source]

Launches the execution of the GROMACS rgyr module.

gromacs.gmx_trjconv_str_ens.main()[source]

gromacs.gmx_trjconv_trj module

Module containing the GMX TrjConvStr class and the command line interface.

class gromacs.gmx_trjconv_trj.GMXTrjConvTrj(input_traj_path, output_traj_path, input_index_path=None, properties=None, **kwargs)[source]

Bases: object

Converts between GROMACS compatible trajectory file formats and/or extracts a selection of atoms. Wrapper of the GROMACS trjconv module.

Parameters:
  • input_traj_path (str) –

    Path to the GROMACS trajectory file. File type: input. Sample file. Accepted formats: xtc, trr, cpt, gro, g96, pdb, tng.

  • input_index_path (str) (Optional) –

    Path to the GROMACS index file. File type: input. Sample file. Accepted formats: ndx.

  • output_traj_path (str) –

    Path to the output file. File type: output. Sample file. Accepted formats: xtc, trr, gro, g96, pdb, tng.

  • properties (dic) –
    • selection (str) - (“System”) Group where the trjconv will be performed. If input_index_path provided, check the file for the accepted values. Values: System, Protein, Protein-H, C-alpha, Backbone, MainChain, MainChain+Cb, MainChain+H, SideChain, SideChain-H, Prot-Masses, non-Protein, Water, SOL, non-Water, Ion, NA, CL, Water_and_ions.
    • start (int) - (0) Time of first frame to read from trajectory (default unit ps).
    • end (int) - (0) Time of last frame to read from trajectory (default unit ps).
    • dt (int) - (0) Only write frame when t MOD dt = first time (ps).
    • gmx_path (str) - (“gmx”) Path to the GROMACS executable binary.
    • remove_tmp (bool) - (True) [WF property] Remove temporal files.
    • restart (bool) - (False) [WF property] Do not execute if output files exist.
    • container_path (str) - (None) Container path definition.
    • container_image (str) - (‘gromacs/gromacs:latest’) Container image definition.
    • container_volume_path (str) - (‘/tmp’) Container volume path definition.
    • container_working_dir (str) - (None) Container working directory definition.
    • container_user_id (str) - (None) Container user_id definition.
    • container_shell_path (str) - (‘/bin/bash’) Path to default shell inside the container.
check_data_params(out_log, err_log)[source]

Checks all the input/output paths and parameters

launch() → int[source]

Launches the execution of the GROMACS rgyr module.

gromacs.gmx_trjconv_trj.main()[source]