pestifer.tasks.terminate module¶
Definition of the TerminateTask class for terminating a pestifer build.
This task is a descendant of the MDTask class and is used to prepare the system for termination.
It handles the copying of state files, writing chain maps, and packaging the system for NAMD runs.
The task also manages the state of the simulation, including the base molecule and various file extensions such as PSF, PDB, COOR, XSC, and VEL.
The task is designed to be used in a workflow where the simulation needs to be gracefully terminated and packaged for further analysis or continuation.
It ensures that all necessary files are collected and organized, making it easy to resume or analyze the simulation later.
- class pestifer.tasks.terminate.TerminateTask(specs: dict = None, **kwargs)[source]¶
Bases:
MDTaskTerminateTask class for terminating a pestifer build. This class inherits from the
MDTaskclass and is used to prepare the system for termination. It handles the copying of state files, writing chain maps, and packaging the system for NAMD runs.- copy_state_to_basename()[source]¶
Copy current state files (psf, pdb, coor, xsc, vel, minimal_prm) to the user-specified basename and re-register state.
- generate_minimal_params() str | None[source]¶
Generate a minimal consolidated CHARMM parameter file for the current PSF.
Collects all parameter files (.prm and .str) registered in the pipeline, merges them, and extracts only the records needed for the atom types present in the current PSF. Writes a single
.prmfile and returns its name. ReturnsNoneif no parameter files are available.
- make_package()[source]¶
Create a package for a production NAMD run starting from the end of the build. State files are included in the tarball under their existing names (the terminate basename); only the tarball itself and the NAMD config script use the package basename.
- print_system_report()[source]¶
Log a summary of the final built system: file sizes, topology counts, and box dimensions.
- write_chainmaps()[source]¶
Write the chain maps to a YAML file. This method retrieves the base molecule from the state variables, gets the chain maps, and writes them to a specified YAML file. The chain maps are used to map chains in the molecular structure, which is useful for understanding the topology of the system.