pestifer.tasks.validate module

This module contains functions for validating PSF/PDB files generated by Pestifer. The user specifies VMD atomselections, variables to get from those selections and values those variables should have.

class pestifer.tasks.validate.AttributeTest(name: str, selection: str, attribute: str, value: str, value_count: int = 1)[source]

Bases: object

This class represents a test for expected values of specific atom attributes in an atom selection.

name

The name of the test.

Type:

str

selection

The atom selection string.

Type:

str

attribute

The atom attribute to test.

Type:

str

value

The expected value of the attribute.

Type:

str

value_count

The number of expected occurrences of the value.

Type:

int

write(vt: VMDScripter)[source]

Write the commands to the VMD script to execute this test.

class pestifer.tasks.validate.ConnectionTest(name: str, selection: str, connection_type: str, connection_count: int = 1)[source]

Bases: object

This class represents a test for expected number of bonds of a specific type among an atomselection.

name

The name of the test.

Type:

str

selection

The atom selection string.

Type:

str

connection_type

The type of connection to test (e.g., “interresidue”).

Type:

str

connection_count

The expected number of connections.

Type:

int

connection_type_supported = {'disulfide', 'glycosylation', 'interresidue'}
write(vt: VMDScripter)[source]
class pestifer.tasks.validate.ResidueTest(name: str, selection: str, measure: str, value: int, relation: str = '==')[source]

Bases: object

This class represents a test for expected properties of a specific residue in an atom selection.

write(vt: VMDScripter)[source]
class pestifer.tasks.validate.ValidateTask(specs: dict = None, **kwargs)[source]

Bases: VMDTask

This class represents a validation task for PSF/PDB files. A validate task can be inserted anywhere in the workflow to perform validation checks.

do()[source]

Execute the validation task.

provision(packet: dict = {})[source]

Provision the task with necessary resources. This method is called to set up the task with the required resources and context. It can be overridden by subclasses to provide additional provisioning logic.

Parameters:

packet (dict, optional) – A dictionary of provisions to be used for the task. If not provided, the existing provisions will be used.