4.6. ligandparam.stages.leap

4.6.1. StageLeap module

This module provides the StageLeap class for generating leap library files for molecular systems.

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

Bases: AbstractStage

Generate leap library files for molecular systems using AmberTools.

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.

  • in_frcmod (str) – Path to the input frcmod file.

  • out_lib (str) – Path to the output library file.

  • molname (str, optional) – Molecule name (default: ‘MOL’).

  • leaprc (list, optional) – List of leaprc configuration files (default: [‘leaprc.gaff2’]).

in_mol2

Path to the input mol2 file.

Type:

Path

in_frcmod

Path to the input frcmod file.

Type:

str

out_lib

Path to the output library file.

Type:

Path

molname

Molecule name.

Type:

str

leaprc

List of leaprc configuration files.

Type:

list

out_pdb

Path to the output pdb file.

Type:

Path

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])

Setup and execute the leap library file generation.

list_files_in_directory(directory)

List all the files in a directory.

Initialize the StageLeap 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])

Setup and execute the leap library file generation.

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]

Setup and execute the leap library file generation.

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