4.5. ligandparam.stages.parmchk

4.5.1. StageParmChk module

This module provides the StageParmChk class for running parmchk on a ligand to generate frcmod files.

class ligandparam.stages.parmchk.StageParmChk(stage_name: str, main_input: Path | str, cwd: Path | str, *args, **kwargs)[source]

Bases: AbstractStage

Run parmchk on the ligand to generate frcmod files.

Parameters:
  • stage_name (str) – The name of the stage.

  • main_input (Union[Path, str]) – Path to the input mol2 file.

  • cwd (Union[Path, str]) – Current working directory.

  • out_frcmod (str) – Path to the output frcmod file.

  • net_charge (float, optional) – Net charge for the molecule (default: 0.0).

in_mol2

Path to the input mol2 file.

Type:

Path

out_frcmod

Path to the output frcmod file.

Type:

Path

net_charge

Net charge for the molecule.

Type:

float

Methods

add_required(filename)

Add a required file to the stage.

append_stage(stage)

Append a stage to the current stage.

clean()

Clean up the stage.

execute([dry_run, nproc, mem])

Execute the parmchk calculation to obtain the frcmod file.

list_files_in_directory(directory)

List all the files in a directory.

Initialize the StageParmChk class.

Parameters:
  • stage_name (str) – The name of the stage.

  • main_input (Union[Path, str]) – Path to the input mol2 file.

  • cwd (Union[Path, str]) – Current working directory.

  • *args – Additional positional arguments.

  • **kwargs – Additional keyword arguments.

Methods

add_required(filename)

Add a required file to the stage.

append_stage(stage)

Append a stage to the current stage.

clean()

Clean up the stage.

execute([dry_run, nproc, mem])

Execute the parmchk calculation to obtain the frcmod file.

list_files_in_directory(directory)

List all the files in a directory.

execute(dry_run=False, nproc: int | None = None, mem: int | None = None) Any[source]

Execute the parmchk calculation to obtain the frcmod file.

Parameters:
  • dry_run (bool, optional) – If True, the stage will not be executed, but the function will print the commands that would be run.

  • nproc (int, optional) – Number of processors to use.

  • mem (int, optional) – Amount of memory to use (in GB).

Return type:

None

Raises:

RuntimeError – If ‘ATTN’ is found in the output frcmod file.