pestifer.core.artifacts module

A class for handling artifacts in the Pestifer core. Artifacts are files or data generated during the execution of tasks and are managed by the PipelineContext.

Tasks are the primary creators of Artifacts, and the pipeline context is responsible for managing their lifecycles. Any task may create and register an Artifact. All tasks have a register method that interfaces with the pipeline to register an Artifact, and a get_current_artifact method to retrieve an Artifact by its key.

All Artifacts must have a “key” that the pipeline uses to track them. A key value is normally created when an Artifact is created:

Any artifact can be retrieved from the pipeline context, in a later task, say, using its key:

Containers of Artifacts can also be registered and retrieved. However, importantly, Artifact containers do not have a single key attribute. A key is associated with an Artifact container when a task calls its register method:

Artifact containers allow for groups of artifacts to be associated with a single key, making it easier to manage related artifacts, and to separate them from other artifacts in the pipeline.

The data in an artifact can be any object, but most useful are Paths. Artifacts with data that are Paths are called FileArtifacts. When a task creates a file, it is a good idea to create a FileArtifact and register it.

This is how the pipeline is used to “pass” files from one task to any other. Because each Artifact’s registration associates it with a specific task instance, later tasks can query the pipeline for artifacts created by previous tasks using their keys and task ids.

class pestifer.core.artifacts.Artifact(data: object | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>)[source]

Bases: object

Base Artifact class.

copy(**kwargs) Artifact[source]

Create a copy of the artifact, optionally overriding attributes with keyword arguments.

Parameters:

**kwargs (dict) – Attributes to override in the copied artifact.

Returns:

A new Artifact instance with the same attributes as the original, except for any overridden by kwargs.

Return type:

Artifact

data: object | None = None

The data contained in the artifact.

has_stamp() bool[source]

Check if the artifact has a stamp (owner information).

Returns:

True if the artifact has a stamp, False otherwise.

Return type:

bool

key: str | None = None

A unique identifier for the artifact.

produced_by: object | None = None

The task that generated the artifact.

provenance: list[object]

A list of tasks that registered the artifact, ordered chronologically.

stamp(owner: object) Artifact[source]

Stamp the artifact with the owner information. Any attributes that are instances of Artifact are also stamped.

Parameters:

owner (object) – The owner of the artifact, which can be any object that produced this artifact.

class pestifer.core.artifacts.ArtifactDict(data: dict[str, ~pestifer.core.artifacts.Artifact]=<factory>, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>)[source]

Bases: Artifact

Dictionary of Artifacts.

clear() None[source]

Clear all artifacts from the dictionary.

filter_by_produced_by(produced_by: object) ArtifactDict[source]

Filter the artifact dictionary by the producer of artifacts.

Parameters:

produced_by (object) – The producer of artifacts to filter by.

Returns:

A new ArtifactDict containing only the artifacts produced by the specified producer.

Return type:

ArtifactDict

classmethod from_list(artifact_list: ArtifactList) ArtifactDict[source]

Create an ArtifactDict from an ArtifactList.

get(key: str, default: Artifact | None = None) Artifact | None[source]

Get an artifact by key, returning a default value if the key is not found.

items() list[tuple[str, Artifact]][source]

Get a list of all key-artifact pairs in the dictionary.

keys() list[str][source]

Get a list of all keys in the dictionary.

pop(key, default=None) Artifact[source]

Remove and return an arbitrary artifact from the dictionary.

stamp(owner: object) ArtifactDict[source]

Stamp all artifacts in the dictionary with the owner information.

Parameters:

owner (object) – The owner of the artifacts, which can be any object that produced these artifacts.

Returns:

The artifact dictionary with all artifacts stamped with the owner information.

Return type:

ArtifactDict

to_list() ArtifactList[source]

Create an ArtifactList from the ArtifactDict.

update_item(artifact: Artifact, key: str | None = None) None[source]

Updates a new or existing key in the ArtifactDict with an Artifact.

values() list[Artifact][source]

Get a list of all artifacts in the dictionary.

class pestifer.core.artifacts.ArtifactList(data: list[Artifact] = <factory>, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>)[source]

Bases: Artifact

A list of Artifacts.

append(item: Artifact) None[source]

Append an Artifact to the list, if it is not already present.

extend(items: list[Artifact]) None[source]

Extend the list by appending elements from the iterable.

filter_by_artifact_type(artifact_type: type[Artifact]) ArtifactList[source]

Filter the artifact list by the type of artifacts.

Parameters:

artifact_type (type[Artifact]) – The type of artifacts to filter by.

Returns:

A new ArtifactList containing only the artifacts of the specified type.

Return type:

ArtifactList

filter_by_key(key: str) ArtifactList[source]

Filter the artifact list by the key of artifacts.

Parameters:

key (str) – The key of artifacts to filter by.

Returns:

A new ArtifactList containing only the artifacts with the specified key.

Return type:

ArtifactList

filter_by_produced_by(produced_by: object) ArtifactList[source]

Filter the artifact list by the task that produced them.

Parameters:

produced_by (object) – The task or object that produced the artifacts to filter by.

Returns:

A new ArtifactList containing only the artifacts produced by the specified task.

Return type:

ArtifactList

classmethod from_dict(artifact_dict: ArtifactDict) ArtifactList[source]

Create an ArtifactList from an ArtifactDict.

remove(item: Artifact) None[source]

Remove an Artifact from the list.

sort(*, key=None, reverse: bool = False) None[source]

Sort the list in place.

stamp(owner: object) ArtifactList[source]

Stamp all artifacts in the list with the owner information.

Parameters:

owner (object) – The owner of the artifacts, which can be any object that produced these artifacts. If not provided, the artifacts will not be stamped.

Returns:

The artifact list with all artifacts stamped with the owner information.

Return type:

ArtifactList

to_dict() ArtifactDict[source]

Create an ArtifactDict from the ArtifactList.

class pestifer.core.artifacts.CIFFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'CIF file', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'cif')[source]

Bases: TXTFileArtifact

A CIF file artifact.

description: str = 'CIF file'

A brief description of the file artifact; optional.

ext: str = 'cif'
class pestifer.core.artifacts.CSVDataFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'CSV data file', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'csv')[source]

Bases: DataFileArtifact

A CSV data file artifact.

description: str = 'CSV data file'

A brief description of the file artifact; optional.

ext: str = 'csv'
class pestifer.core.artifacts.CSVDataFileArtifactList(data: list[FileArtifact] = <factory>, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'List of CSV data files')[source]

Bases: DataFileArtifactList

A list of CSV data file artifacts.

description: str = 'List of CSV data files'
class pestifer.core.artifacts.CharmmffFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'CHARMM force field file', mime_type: str | None = 'application/octet-stream', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False)[source]

Bases: FileArtifact

A CHARMM force field file artifact.

description: str = 'CHARMM force field file'

A brief description of the file artifact; optional.

class pestifer.core.artifacts.CharmmffFileArtifactList(data: list[FileArtifact] = <factory>, key: str = 'charmm_files', produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'CHARMM file artifacts')[source]

Bases: FileArtifactList

A collection of CHARMM file artifacts.

append(item: CharmmffFileArtifact) None[source]

Append a CHARMM file artifact to the collection.

description: str = 'CHARMM file artifacts'
extend(items: list[CharmmffFileArtifact]) None[source]

Extend the collection by appending elements from the iterable.

key: str = 'charmm_files'

A unique identifier for the artifact.

class pestifer.core.artifacts.CharmmffParFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'CHARMM force field parameter file', mime_type: str | None = 'application/octet-stream', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'prm')[source]

Bases: CharmmffFileArtifact

A toplevel CHARMM force field parameter file artifact.

description: str = 'CHARMM force field parameter file'

A brief description of the file artifact; optional.

ext: str = 'prm'
class pestifer.core.artifacts.CharmmffParFileArtifacts(data: list[FileArtifact] = <factory>, key: str = 'charmm_files', produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'CHARMM force field parameter files')[source]

Bases: CharmmffFileArtifactList

A collection of CHARMM force field parameter file artifacts.

append(item: CharmmffParFileArtifact | str | Path) None[source]

Append a CHARMM force field parameter file artifact to the collection.

description: str = 'CHARMM force field parameter files'
class pestifer.core.artifacts.CharmmffStreamFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'CHARMM force field stream file', mime_type: str | None = 'application/octet-stream', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'str')[source]

Bases: CharmmffFileArtifact

A CHARMM force field stream file artifact.

description: str = 'CHARMM force field stream file'

A brief description of the file artifact; optional.

ext: str = 'str'
class pestifer.core.artifacts.CharmmffStreamFileArtifacts(data: list[FileArtifact] = <factory>, key: str = 'charmm_files', produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'CHARMM force field stream files')[source]

Bases: CharmmffFileArtifactList

A collection of CHARMM force field stream file artifacts.

append(item: CharmmffStreamFileArtifact | str | Path) None[source]

Append a CHARMM force field stream file artifact to the collection.

description: str = 'CHARMM force field stream files'
class pestifer.core.artifacts.CharmmffTopFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'CHARMM force field topology file', mime_type: str | None = 'application/octet-stream', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'rtf')[source]

Bases: CharmmffFileArtifact

A toplevel CHARMM force field topology file artifact.

description: str = 'CHARMM force field topology file'

A brief description of the file artifact; optional.

ext: str = 'rtf'
class pestifer.core.artifacts.CharmmffTopFileArtifacts(data: list[FileArtifact] = <factory>, key: str = 'charmmff_topfiles', produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'CHARMM force field topology files')[source]

Bases: CharmmffFileArtifactList

A collection of CHARMM force field topology file artifacts.

append(item: CharmmffTopFileArtifact | str | Path) None[source]

Append a CHARMM force field topology file artifact to the collection.

description: str = 'CHARMM force field topology files'
key: str = 'charmmff_topfiles'

A unique identifier for the artifact.

class pestifer.core.artifacts.DataArtifact(data: object | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str | None = None)[source]

Bases: Artifact

Represents a data artifact in the Pestifer core.

description: str | None = None
class pestifer.core.artifacts.DataFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Data file', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'dat')[source]

Bases: TXTFileArtifact

A generic data file artifact.

description: str = 'Data file'

A brief description of the file artifact; optional.

ext: str = 'dat'
class pestifer.core.artifacts.DataFileArtifactList(data: list[FileArtifact] = <factory>, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'List of data files')[source]

Bases: FileArtifactList

List of data file artifacts.

description: str = 'List of data files'
class pestifer.core.artifacts.FileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str | None = None, mime_type: str | None = 'application/octet-stream', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False)[source]

Bases: Artifact, ABC

A class for artifacts that are files.

compare(other: FileArtifact | Path) bool[source]
data: str | None = None

The name of the file artifact, with or without extension.

description: str | None = None

A brief description of the file artifact; optional.

diff(other: FileArtifact | Path) str[source]

Compare this file artifact with another for equality.

Parameters:

other (FileArtifact) – The other file artifact to compare against.

Returns:

True if the artifacts are equal, False otherwise.

Return type:

bool

exists() bool[source]

Check if the file artifact exists.

abstract property ext: str

The file extension of the file artifact, which is used as the artifact key by default.

keep: bool = False

If True, cleanup will leave this file in the CWD rather than archiving it.

mime_type: str | None = 'application/octet-stream'

The MIME type of the file artifact; ‘application/octet-stream’ by default.

property name: str

The name of the artifact’s file

nonstate_results: bool = False

Flag indicating whether or not this file artifact is a non-state result file, such as a PNG image of a plot.

property path: Path

The file path of the file artifact.

pytestable: bool = False

Flag indicating whether or not this file artifact is pytestable; i.e., if generated by pytest, there is a gold-standard version available for comparison.

remove() None[source]

Remove the file artifact.

validate()[source]

Validate the file artifact.

Raises:

FileNotFoundError – If the file artifact does not exist.

class pestifer.core.artifacts.FileArtifactDict(data: 'dict[str, FileArtifact]'=<factory>, key: 'str | None' = None, produced_by: 'object | None' = None, provenance: 'list[object]' = <factory>)[source]

Bases: ArtifactDict

class pestifer.core.artifacts.FileArtifactList(data: 'list[FileArtifact]' = <factory>, key: 'str | None' = None, produced_by: 'object | None' = None, provenance: 'list[object]' = <factory>)[source]

Bases: ArtifactList

all_exist() bool[source]

Check if all artifact files in the caller exist.

make_tarball(basename: str, remove: bool = False, arcname_prefix: str = None, unique: bool = False)[source]

Create a tarball from the list of artifact files.

Parameters:
  • basename (str) – The base name for the tarball file.

  • remove (bool) – Whether to remove the original files after creating the tarball; default False.

paths_to_list() list[Path][source]

Convert the list of artifact files in the caller to a list of their paths.

unique_paths() FileArtifactList[source]

Reduce the list so that all paths are unique.

class pestifer.core.artifacts.InputFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Generic input file', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'inp')[source]

Bases: TXTFileArtifact

A generic input file artifact.

description: str = 'Generic input file'

A brief description of the file artifact; optional.

ext: str = 'inp'
class pestifer.core.artifacts.JSONFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'JSON file', mime_type: str = 'application/json', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'json')[source]

Bases: TXTFileArtifact

A JSON file artifact.

description: str = 'JSON file'

A brief description of the file artifact; optional.

ext: str = 'json'
mime_type: str = 'application/json'

The MIME type of the file artifact; ‘application/octet-stream’ by default.

class pestifer.core.artifacts.LogFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Log file generated during task execution', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'log')[source]

Bases: TXTFileArtifact

A generic log file artifact.

description: str = 'Log file generated during task execution'

A brief description of the file artifact; optional.

ext: str = 'log'
class pestifer.core.artifacts.LogFileArtifactList(data: list[FileArtifact] = <factory>, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'List of log files')[source]

Bases: FileArtifactList

A list of log file artifacts.

description: str = 'List of log files'
class pestifer.core.artifacts.NAMDColvarsConfigArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'NAMD Colvars configuration file', mime_type: str = 'application/json', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'in')[source]

Bases: JSONFileArtifact

A NAMD Colvars configuration file artifact.

description: str = 'NAMD Colvars configuration file'

A brief description of the file artifact; optional.

ext: str = 'in'
class pestifer.core.artifacts.NAMDColvarsStateArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'NAMD Colvars state output file', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'colvars.state')[source]

Bases: LogFileArtifact

A NAMD Colvars state output file artifact.

description: str = 'NAMD Colvars state output file'

A brief description of the file artifact; optional.

ext: str = 'colvars.state'
class pestifer.core.artifacts.NAMDColvarsTrajectoryArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'NAMD Colvars trajectory output file', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'colvars.traj')[source]

Bases: LogFileArtifact

A NAMD Colvars trajectory output file artifact.

description: str = 'NAMD Colvars trajectory output file'

A brief description of the file artifact; optional.

ext: str = 'colvars.traj'
class pestifer.core.artifacts.NAMDConfigFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'NAMD configuration file', mime_type: str = 'application/x-tcl', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'namd')[source]

Bases: TclScriptArtifact

A NAMD configuration file artifact.

compare(other: NAMDConfigFileArtifact | Path) bool[source]

A specific comparison method for NAMD Config files created by Pestifer. Creation time-stamps are ignored.

description: str = 'NAMD configuration file'

A brief description of the file artifact; optional.

ext: str = 'namd'
class pestifer.core.artifacts.NAMDCoorFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Binary coordinate file', mime_type: str = 'application/octet-stream', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'coor')[source]

Bases: NAMDOutputFileArtifact

A NAMD binary coordinate file artifact.

description: str = 'Binary coordinate file'

A brief description of the file artifact; optional.

ext: str = 'coor'
class pestifer.core.artifacts.NAMDCoorFileArtifactList(data: list[FileArtifact] = <factory>, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'List of NAMD binary coordinate files')[source]

Bases: NAMDOutputFileArtifactList

A list of NAMD binary coordinate file artifacts.

description: str = 'List of NAMD binary coordinate files'
class pestifer.core.artifacts.NAMDDcdFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Binary DCD file', mime_type: str = 'application/octet-stream', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'dcd')[source]

Bases: NAMDOutputFileArtifact

A NAMD binary DCD file artifact.

description: str = 'Binary DCD file'

A brief description of the file artifact; optional.

ext: str = 'dcd'
class pestifer.core.artifacts.NAMDExtraBondsFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'NAMD extraBonds configuration file', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'extrabonds')[source]

Bases: TXTFileArtifact

A NAMD extraBonds configuration file artifact. Plain-text records of the form bond i j k r0 / angle i j k l K theta0 / dihedral i j k l K phi0, fed to NAMD via extraBondsFile. Produced by the VMD ssrestraints plugin or any equivalent generator.

description: str = 'NAMD extraBonds configuration file'

A brief description of the file artifact; optional.

ext: str = 'extrabonds'
class pestifer.core.artifacts.NAMDLogFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Log file for NAMD execution', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'log')[source]

Bases: LogFileArtifact

A NAMD log file artifact.

description: str = 'Log file for NAMD execution'

A brief description of the file artifact; optional.

class pestifer.core.artifacts.NAMDLogFileArtifactList(data: list[FileArtifact] = <factory>, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'List of NAMD log files')[source]

Bases: LogFileArtifactList

A list of NAMD log file artifacts.

description: str = 'List of NAMD log files'
class pestifer.core.artifacts.NAMDOutputFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Output file for NAMD execution', mime_type: str = 'application/octet-stream', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False)[source]

Bases: FileArtifact

A generic binary NAMD output file artifact.

description: str = 'Output file for NAMD execution'

A brief description of the file artifact; optional.

mime_type: str = 'application/octet-stream'

The MIME type of the file artifact; ‘application/octet-stream’ by default.

class pestifer.core.artifacts.NAMDOutputFileArtifactList(data: list[FileArtifact] = <factory>, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'List of output files for NAMD execution')[source]

Bases: FileArtifactList

A list of generic binary NAMD output file artifacts.

description: str = 'List of output files for NAMD execution'
class pestifer.core.artifacts.NAMDVelFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Binary velocity file', mime_type: str = 'application/octet-stream', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'vel')[source]

Bases: NAMDOutputFileArtifact

A NAMD binary velocity file artifact.

description: str = 'Binary velocity file'

A brief description of the file artifact; optional.

ext: str = 'vel'
class pestifer.core.artifacts.NAMDXscFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'XSC file', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'xsc')[source]

Bases: LogFileArtifact

A NAMD XSC file artifact.

description: str = 'XSC file'

A brief description of the file artifact; optional.

ext: str = 'xsc'
class pestifer.core.artifacts.NAMDXstFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'XST file', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'xst')[source]

Bases: LogFileArtifact

A NAMD XST file artifact.

description: str = 'XST file'

A brief description of the file artifact; optional.

ext: str = 'xst'
class pestifer.core.artifacts.PDBFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'PDB file', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'pdb')[source]

Bases: TXTFileArtifact

A generic PDB file artifact.

compare(other: PDBFileArtifact | Path)[source]

A specific comparison method for pairs of PDB files. Name-by-name congruency of atom list is checked, excluding all waters.

description: str = 'PDB file'

A brief description of the file artifact; optional.

ext: str = 'pdb'
class pestifer.core.artifacts.PDBFileArtifactList(data: list[FileArtifact] = <factory>, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'List of PDB files')[source]

Bases: FileArtifactList

A list of PDB file artifacts.

description: str = 'List of PDB files'
class pestifer.core.artifacts.PNGImageFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'PNG image file', mime_type: str = 'image/png', pytestable: bool = False, nonstate_results: bool = True, keep: bool = False, ext: str = 'png')[source]

Bases: FileArtifact

A PNG image file artifact.

description: str = 'PNG image file'

A brief description of the file artifact; optional.

ext: str = 'png'
mime_type: str = 'image/png'

The MIME type of the file artifact; ‘application/octet-stream’ by default.

nonstate_results: bool = True

Flag indicating whether or not this file artifact is a non-state result file, such as a PNG image of a plot.

class pestifer.core.artifacts.PNGImageFileArtifactList(data: list[FileArtifact] = <factory>, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'List of PNG image files')[source]

Bases: FileArtifactList

A list of PNG image file artifacts.

description: str = 'List of PNG image files'
class pestifer.core.artifacts.PQRFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'PQR file', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'pqr')[source]

Bases: TXTFileArtifact

A PQR file artifact (output generated by pdb2pqr).

description: str = 'PQR file'

A brief description of the file artifact; optional.

ext: str = 'pqr'
class pestifer.core.artifacts.PSFFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'PSF file', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'psf')[source]

Bases: TXTFileArtifact

A PSF file artifact.

compare(other: PSFFileArtifact | Path) bool[source]

A specific comparison method for pairs of PSF files. Waters are ignored.

description: str = 'PSF file'

A brief description of the file artifact; optional.

ext: str = 'psf'
class pestifer.core.artifacts.PSFFileArtifactList(data: list[FileArtifact] = <factory>, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'List of PSF files')[source]

Bases: FileArtifactList

A list of PSF file artifacts.

description: str = 'List of PSF files'
class pestifer.core.artifacts.PackMolPDBForcedFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Packmol-generated PDB file with forced formatting', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'pdb_FORCED')[source]

Bases: PDBFileArtifact

A Packmol PDB file artifact with forced formatting.

description: str = 'Packmol-generated PDB file with forced formatting'

A brief description of the file artifact; optional.

ext: str = 'pdb_FORCED'
class pestifer.core.artifacts.PackmolInputScriptArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Packmol input script', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'inp')[source]

Bases: TXTFileArtifact

A Packmol input script artifact.

description: str = 'Packmol input script'

A brief description of the file artifact; optional.

ext: str = 'inp'
class pestifer.core.artifacts.PackmolLogFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Log file for Packmol execution', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'log')[source]

Bases: LogFileArtifact

A Packmol log file artifact.

description: str = 'Log file for Packmol execution'

A brief description of the file artifact; optional.

class pestifer.core.artifacts.PsfgenInputScriptArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'PSFgen input script', mime_type: str = 'application/x-tcl', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'tcl')[source]

Bases: VMDScriptArtifact

A PSFgen input script artifact.

description: str = 'PSFgen input script'

A brief description of the file artifact; optional.

class pestifer.core.artifacts.PsfgenLogFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Log file for psfgen execution', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'log')[source]

Bases: VMDLogFileArtifact

A psfgen log file artifact.

description: str = 'Log file for psfgen execution'

A brief description of the file artifact; optional.

class pestifer.core.artifacts.StateArtifacts(data: dict[str, ~pestifer.core.artifacts.FileArtifact]=<factory>, key: str = 'state', produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Set of congruent topology/coordinate/system files', pdb: str | Path | PDBFileArtifact | None = None, psf: str | Path | PSFFileArtifact | None = None, coor: str | Path | NAMDCoorFileArtifact | None = None, vel: str | Path | NAMDVelFileArtifact | None = None, xsc: str | Path | NAMDXscFileArtifact | None = None, minimal_prm: str | Path | CharmmffParFileArtifact | None = None)[source]

Bases: FileArtifactDict

Compound artifact holding congruent PSF/COOR/PDB/VEL files and XSC files corresponding to the same state.

coor: str | Path | NAMDCoorFileArtifact | None = None

The coordinate file name, Path, or NAMDCoorFileArtifact.

description: str = 'Set of congruent topology/coordinate/system files'

A brief description of the state artifacts.

key: str = 'state'

The key identifying the state artifacts; ‘state’ by default.

minimal_prm: str | Path | CharmmffParFileArtifact | None = None

The minimal consolidated CHARMM parameter file, Path, or CharmmffParFileArtifact.

pdb: str | Path | PDBFileArtifact | None = None

The PDB file name, Path, or PDBFileArtifact.

psf: str | Path | PSFFileArtifact | None = None

The PSF file name, Path, or PSFFileArtifact.

stamp(owner: object) StateArtifacts[source]

Stamp all artifacts in the dictionary with the owner information.

Parameters:

owner (object) – The owner of the artifacts, which can be any object that produced these artifacts.

Returns:

The artifact dictionary with all artifacts stamped with the owner information.

Return type:

ArtifactDict

to_list()[source]

Create an ArtifactList from the ArtifactDict.

vel: str | Path | NAMDVelFileArtifact | None = None

The velocity file name, Path, or NAMDVelFileArtifact.

xsc: str | Path | NAMDXscFileArtifact | None = None

The XSC file name, Path, or NAMDXscFileArtifact.

class pestifer.core.artifacts.TXTFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Text file', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'txt')[source]

Bases: FileArtifact

A text file artifact.

description: str = 'Text file'

A brief description of the file artifact; optional.

ext: str = 'txt'
mime_type: str = 'text/plain'

The MIME type of the file artifact; ‘application/octet-stream’ by default.

class pestifer.core.artifacts.TclScriptArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Tcl script file', mime_type: str = 'application/x-tcl', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'tcl')[source]

Bases: TXTFileArtifact

A Tcl script file artifact.

description: str = 'Tcl script file'

A brief description of the file artifact; optional.

ext: str = 'tcl'
mime_type: str = 'application/x-tcl'

The MIME type of the file artifact; ‘application/octet-stream’ by default.

class pestifer.core.artifacts.VMDLogFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'Log file for VMD execution', mime_type: str = 'text/plain', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'log')[source]

Bases: LogFileArtifact

A VMD log file artifact.

description: str = 'Log file for VMD execution'

A brief description of the file artifact; optional.

class pestifer.core.artifacts.VMDScriptArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'VMD script file', mime_type: str = 'application/x-tcl', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'tcl')[source]

Bases: TclScriptArtifact

A VMD script file artifact.

description: str = 'VMD script file'

A brief description of the file artifact; optional.

class pestifer.core.artifacts.YAMLFileArtifact(data: str | None = None, key: str | None = None, produced_by: object | None = None, provenance: list[object] = <factory>, description: str = 'YAML file', mime_type: str = 'application/x-yaml', pytestable: bool = False, nonstate_results: bool = False, keep: bool = False, ext: str = 'yaml')[source]

Bases: TXTFileArtifact

A YAML file artifact.

description: str = 'YAML file'

A brief description of the file artifact; optional.

ext: str = 'yaml'
mime_type: str = 'application/x-yaml'

The MIME type of the file artifact; ‘application/octet-stream’ by default.