cphstats package

Submodules

cphstats.cphstats_run module

Module containing the Cphstats class and the command line interface.

class cphstats.cphstats_run.CphstatsRun(input_cpin_path: str, input_cpout_path: str, output_dat_path: str, output_population_path: str | None = None, output_chunk_path: str | None = None, output_cumulative_path: str | None = None, output_conditional_path: str | None = None, output_chunk_conditional_path: str | None = None, properties: dict | None = None, **kwargs)[source]

Bases: BiobbObject

biobb_amber CphstatsRun
Analyzing the results of constant pH MD simulations using cphstats tool from the AMBER MD package.
Parameters:
  • input_cpin_path (str) – Input constant pH file (AMBER cpin). File type: input. Sample file. Accepted formats: cpin (edam:format_2330).

  • input_cpout_path (str) –

    Output constant pH file (AMBER cpout). File type: input. Sample file. Accepted formats: cpout (edam:format_2330), zip (edam:format_3987), gzip (edam:format_3987).

  • output_dat_path (str) –

    Output file to which the standard calcpka-type statistics are written. File type: output. Sample file. Accepted formats: dat (edam:format_2330), out (edam:format_2330), txt (edam:format_2330), o (edam:format_2330).

  • output_population_path (str) (Optional) –

    Output file where protonation state populations are printed for every state of every residue. File type: output. Sample file. Accepted formats: dat (edam:format_2330), out (edam:format_2330), txt (edam:format_2330), o (edam:format_2330).

  • output_chunk_path (str) (Optional) –

    Output file where the time series data calculated over chunks of the simulation are printed. File type: output. Sample file. Accepted formats: dat (edam:format_2330), out (edam:format_2330), txt (edam:format_2330), o (edam:format_2330).

  • output_cumulative_path (str) (Optional) –

    Output file where the cumulative time series data is printed. File type: output. Sample file. Accepted formats: dat (edam:format_2330), out (edam:format_2330), txt (edam:format_2330), o (edam:format_2330).

  • output_conditional_path (str) (Optional) –

    Output file with requested conditional probabilities. File type: output. Sample file. Accepted formats: dat (edam:format_2330), out (edam:format_2330), txt (edam:format_2330), o (edam:format_2330).

  • output_chunk_conditional_path (str) (Optional) –

    Output file with a time series of the conditional probabilities over a trajectory split up into chunks. File type: output. Sample file. Accepted formats: dat (edam:format_2330), out (edam:format_2330), txt (edam:format_2330), o (edam:format_2330).

  • properties (dict - Python dictionary object containing the tool parameters, not input/output files) –

    • timestep (float) - (0.002) Simulation time step -in ps-, used to print data as a function of time.

    • verbose (bool) - (False) Controls how much information is printed to the calcpka-style output file. Options are: False - Just print fraction protonated. True - Print everything calcpka prints.

    • interval (int) - (1000) Interval between which to print out time series data like chunks, cumulative data, and running averages. It is also used as the window of the conditional probability time series.

    • protonated (bool) - (True) Print out protonation fraction instead of deprotonation fraction in time series data.

    • pka (bool) - (False) Print predicted pKas -via Henderson-Hasselbalch equation- in place of fraction -de-protonated.

    • calcpka (bool) - (True) Triggers the calcpka-style output.

    • running_avg_window (int) - (100) Defines a window size -in MD steps- for a moving, running average time series.

    • chunk_window (int) - (100) Computes the time series data over a chunk of the simulation of this specified size -window- time steps.

    • cumulative (bool) - (False) Computes the cumulative average time series data over the course of the trajectory.

    • fix_remd (str) - (“”) This option will trigger cphstats to reassemble the titration data into pH-specific ensembles. This is an exclusive mode of the program, no other analyses will be done.

    • conditional (str) - (“”) Evaluates conditional probabilities. CONDITIONAL should be a string of the format: <resid>:<state>,<resid>:<state>,… or <resid>:PROT,<resid>:DEPROT,… or <resid>:<state1>;<state2>,<resid>:PROT,… where <resid> is the residue number in the prmtop and <state> is either the state number or -p-rotonated or -d-eprotonated, case-insensitive.

    • binary_path (str) - (“cphstats”) Path to the cphstats executable binary.

    • remove_tmp (bool) - (True) [WF property] Remove temporal files.

    • restart (bool) - (False) [WF property] Do not execute if output files exist.

    • container_path (str) - (None) Container path definition.

    • container_image (str) - (‘afandiadib/ambertools:serial’) Container image definition.

    • container_volume_path (str) - (‘/tmp’) Container volume path definition.

    • container_working_dir (str) - (None) Container working directory definition.

    • container_user_id (str) - (None) Container user_id definition.

    • container_shell_path (str) - (‘/bin/bash’) Path to default shell inside the container.

Examples

This is a use example of how to use the building block from Python:

from biobb_amber.cphstats.cphstats_run import cphstats_run
prop = {
    'timestep' : 0.002
}
cphstats_run(input_cpin_path='/path/to/cpin.cpin',
             input_cpout_path='/path/to/cpout.cpout',
             output_dat_path='/path/to/cphstats.dat',
             properties=prop)
Info:
check_data_params(out_log, err_log)[source]

Checks input/output paths correctness

launch()[source]

Launches the execution of the CphstatsRun module.

cphstats.cphstats_run.cphstats_run(input_cpin_path: str, input_cpout_path: str, output_dat_path: str, output_population_path: str | None = None, output_chunk_path: str | None = None, output_conditional_path: str | None = None, output_chunk_conditional_path: str | None = None, output_cumulative_path: str | None = None, properties: dict | None = None, **kwargs) int[source]

Create CphstatsRun method

cphstats.cphstats_run.main()[source]

cphstats.cestats_run module

Module containing the Cestats class and the command line interface.

class cphstats.cestats_run.CestatsRun(input_cein_path: str, input_ceout_path: str, output_dat_path: str, output_population_path: str | None = None, output_chunk_path: str | None = None, output_cumulative_path: str | None = None, output_conditional_path: str | None = None, output_chunk_conditional_path: str | None = None, properties: dict | None = None, **kwargs)[source]

Bases: BiobbObject

biobb_amber CestatsRun
Analyzing the results of constant Redox potential MD simulations using cestats tool from the AMBER MD package.
Parameters:
  • input_cein_path (str) –

    Input cein or cpein file (from pmemd or sander) with titrating residue information. File type: input. Sample file. Accepted formats: cein (edam:format_2330), cpein (edam:format_2330).

  • input_ceout_path (str) –

    Output ceout file (AMBER ceout). File type: input. Sample file. Accepted formats: ceout (edam:format_2330), zip (edam:format_3987), gzip (edam:format_3987), gz (edam:format_3987).

  • output_dat_path (str) –

    Output file to which the standard calceo-type statistics are written. File type: output. Sample file. Accepted formats: dat (edam:format_2330), out (edam:format_2330), txt (edam:format_2330), o (edam:format_2330).

  • output_population_path (str) (Optional) –

    Output file where protonation state populations are printed for every state of every residue. File type: output. Sample file. Accepted formats: dat (edam:format_2330), out (edam:format_2330), txt (edam:format_2330), o (edam:format_2330).

  • output_chunk_path (str) (Optional) –

    Output file where the time series data calculated over chunks of the simulation are printed. File type: output. Sample file. Accepted formats: dat (edam:format_2330), out (edam:format_2330), txt (edam:format_2330), o (edam:format_2330).

  • output_cumulative_path (str) (Optional) –

    Output file where the cumulative time series data is printed. File type: output. Sample file. Accepted formats: dat (edam:format_2330), out (edam:format_2330), txt (edam:format_2330), o (edam:format_2330).

  • output_conditional_path (str) (Optional) –

    Output file with requested conditional probabilities. File type: output. Sample file. Accepted formats: dat (edam:format_2330), out (edam:format_2330), txt (edam:format_2330), o (edam:format_2330).

  • output_chunk_conditional_path (str) (Optional) –

    Output file with a time series of the conditional probabilities over a trajectory split up into chunks. File type: output. Sample file. Accepted formats: dat (edam:format_2330), out (edam:format_2330), txt (edam:format_2330), o (edam:format_2330).

  • properties (dict - Python dictionary object containing the tool parameters, not input/output files) –

    • timestep (float) - (0.002) Simulation time step -in ps-, used to print data as a function of time.

    • verbose (bool) - (False) Controls how much information is printed to the calceo-style output file. Options are: False - Just print fraction protonated. True - Print everything calceo prints.

    • interval (int) - (1000) Interval between which to print out time series data like chunks, cumulative data, and running averages. It is also used as the window of the conditional probability time series.

    • reduced (bool) - (True) Print out reduction fraction instead of oxidation fraction in time series data.

    • eos (bool) - (False) Print predicted Eos -via Nernst equation- in place of fraction reduced or oxidized.

    • calceo (bool) - (True) Triggers the calceo-style output.

    • running_avg_window (int) - (100) Defines a window size -in MD steps- for a moving, running average time series.

    • chunk_window (int) - (100) Computes the time series data over a chunk of the simulation of this specified size -window- time steps.

    • cumulative (bool) - (False) Computes the cumulative average time series data over the course of the trajectory.

    • fix_remd (str) - (“”) This option will trigger cestats to reassemble the titration data into pH-specific ensembles. This is an exclusive mode of the program, no other analyses will be done.

    • conditional (str) - (“”) Evaluates conditional probabilities. CONDITIONAL should be a string of the format: <resid>:<state>,<resid>:<state>,… or <resid>:PROT,<resid>:DEPROT,… or <resid>:<state1>;<state2>,<resid>:PROT,… where <resid> is the residue number in the prmtop and <state> is either the state number or -p-rotonated or -d-eprotonated, case-insensitive.

    • binary_path (str) - (“cestats”) Path to the cestats executable binary.

    • remove_tmp (bool) - (True) [WF property] Remove temporal files.

    • restart (bool) - (False) [WF property] Do not execute if output files exist.

    • container_path (str) - (None) Container path definition.

    • container_image (str) - (‘afandiadib/ambertools:serial’) Container image definition.

    • container_volume_path (str) - (‘/tmp’) Container volume path definition.

    • container_working_dir (str) - (None) Container working directory definition.

    • container_user_id (str) - (None) Container user_id definition.

    • container_shell_path (str) - (‘/bin/bash’) Path to default shell inside the container.

Examples

This is a use example of how to use the building block from Python:

from biobb_amber.cestats.cestats_run import cestats_run
prop = {
    'timestep' : 0.002
}
cestats_run(input_cein_path='/path/to/cein.cein',
             input_ceout_path='/path/to/ceout.cpout',
             output_dat_path='/path/to/cestats.dat',
             properties=prop)
Info:
check_data_params(out_log, err_log)[source]

Checks input/output paths correctness

launch()[source]

Launches the execution of the CestatsRun module.

cphstats.cestats_run.cestats_run(input_cein_path: str, input_ceout_path: str, output_dat_path: str, output_population_path: str | None = None, output_chunk_path: str | None = None, output_conditional_path: str | None = None, output_chunk_conditional_path: str | None = None, output_cumulative_path: str | None = None, properties: dict | None = None, **kwargs) int[source]

Create CestatsRun method

cphstats.cestats_run.main()[source]