w_kinetics
WARNING: w_kinetics is being deprecated. Please use w_direct instead.
usage:
w_kinetics trace [-h] [-W WEST_H5FILE] [--first-iter N_ITER] [--last-iter N_ITER]
[--step-iter STEP] [-a ASSIGNMENTS] [-o OUTPUT]
Calculate state-to-state rates and transition event durations by tracing trajectories.
A bin assignment file (usually “assign.h5”) including trajectory labeling is required (see “w_assign –help” for information on generating this file).
This subcommand for w_direct is used as input for all other w_direct subcommands, which will convert the flux data in the output file into average rates/fluxes/populations with confidence intervals.
Output format
The output file (-o/–output, by default “direct.h5”) contains the following datasets:
``/conditional_fluxes`` [iteration][state][state]
*(Floating-point)* Macrostate-to-macrostate fluxes. These are **not**
normalized by the population of the initial macrostate.
``/conditional_arrivals`` [iteration][stateA][stateB]
*(Integer)* Number of trajectories arriving at state *stateB* in a given
iteration, given that they departed from *stateA*.
``/total_fluxes`` [iteration][state]
*(Floating-point)* Total flux into a given macrostate.
``/arrivals`` [iteration][state]
*(Integer)* Number of trajectories arriving at a given state in a given
iteration, regardless of where they originated.
``/duration_count`` [iteration]
*(Integer)* The number of event durations recorded in each iteration.
``/durations`` [iteration][event duration]
*(Structured -- see below)* Event durations for transition events ending
during a given iteration. These are stored as follows:
istate
*(Integer)* Initial state of transition event.
fstate
*(Integer)* Final state of transition event.
duration
*(Floating-point)* Duration of transition, in units of tau.
weight
*(Floating-point)* Weight of trajectory at end of transition, **not**
normalized by initial state population.
Because state-to-state fluxes stored in this file are not normalized by
initial macrostate population, they cannot be used as rates without further
processing. The w_direct kinetics
command is used to perform this normalization
while taking statistical fluctuation and correlation into account. See
w_direct kinetics --help
for more information. Target fluxes (total flux
into a given state) require no such normalization.
Command-line options
optional arguments:
-h, --help show this help message and exit
WEST input data options:
-W WEST_H5FILE, --west-data WEST_H5FILE
Take WEST data from WEST_H5FILE (default: read from the HDF5 file specified in
west.cfg).
iteration range:
--first-iter N_ITER Begin analysis at iteration N_ITER (default: 1).
--last-iter N_ITER Conclude analysis with N_ITER, inclusive (default: last completed iteration).
--step-iter STEP Analyze/report in blocks of STEP iterations.
input/output options:
-a ASSIGNMENTS, --assignments ASSIGNMENTS
Bin assignments and macrostate definitions are in ASSIGNMENTS (default:
assign.h5).
-o OUTPUT, --output OUTPUT
Store results in OUTPUT (default: kintrace.h5).
westpa.cli.tools.w_kinetics module
- class westpa.cli.tools.w_kinetics.WESTMasterCommand
Bases:
WESTTool
Base class for command-line tools that employ subcommands
- add_args(parser)
Add arguments specific to this tool to the given argparse parser.
- go()
Perform the analysis associated with this tool.
- include_help_command = True
- process_args(args)
Take argparse-processed arguments associated with this tool and deal with them appropriately (setting instance variables, etc)
- subcommands = None
- subparsers_title = None
- class westpa.cli.tools.w_kinetics.WESTParallelTool(wm_env=None)
Bases:
WESTTool
Base class for command-line tools parallelized with wwmgr. This automatically adds and processes wwmgr command-line arguments and creates a work manager at self.work_manager.
- add_args(parser)
Add arguments specific to this tool to the given argparse parser.
- go()
Perform the analysis associated with this tool.
- main()
A convenience function to make a parser, parse and process arguments, then run self.go() in the master process.
- make_parser_and_process(prog=None, usage=None, description=None, epilog=None, args=None)
A convenience function to create a parser, call add_all_args(), and then call process_all_args(). The argument namespace is returned.
- process_args(args)
Take argparse-processed arguments associated with this tool and deal with them appropriately (setting instance variables, etc)
- westpa.cli.tools.w_kinetics.warn()
Issue a warning, or maybe ignore it or raise an exception.
- message
Text of the warning message.
- category
The Warning category subclass. Defaults to UserWarning.
- stacklevel
How far up the call stack to make this warning appear. A value of 2 for example attributes the warning to the caller of the code calling warn().
- source
If supplied, the destroyed object which emitted a ResourceWarning
- skip_file_prefixes
An optional tuple of module filename prefixes indicating frames to skip during stacklevel computations for stack frame attribution.
- class westpa.cli.tools.w_kinetics.DKinetics(parent)
Bases:
WESTKineticsBase
,WKinetics
- default_kinetics_file = 'direct.h5'
- default_output_file = 'direct.h5'
- description = 'Calculate state-to-state rates and transition event durations by tracing\ntrajectories.\n\nA bin assignment file (usually "assign.h5") including trajectory labeling\nis required (see "w_assign --help" for information on generating this file).\n\nThis subcommand for w_direct is used as input for all other w_direct\nsubcommands, which will convert the flux data in the output file into\naverage rates/fluxes/populations with confidence intervals.\n\n-----------------------------------------------------------------------------\nOutput format\n-----------------------------------------------------------------------------\n\nThe output file (-o/--output, by default "direct.h5") contains the\nfollowing datasets:\n\n ``/conditional_fluxes`` [iteration][state][state]\n *(Floating-point)* Macrostate-to-macrostate fluxes. These are **not**\n normalized by the population of the initial macrostate.\n\n ``/conditional_arrivals`` [iteration][stateA][stateB]\n *(Integer)* Number of trajectories arriving at state *stateB* in a given\n iteration, given that they departed from *stateA*.\n\n ``/total_fluxes`` [iteration][state]\n *(Floating-point)* Total flux into a given macrostate.\n\n ``/arrivals`` [iteration][state]\n *(Integer)* Number of trajectories arriving at a given state in a given\n iteration, regardless of where they originated.\n\n ``/duration_count`` [iteration]\n *(Integer)* The number of event durations recorded in each iteration.\n\n ``/durations`` [iteration][event duration]\n *(Structured -- see below)* Event durations for transition events ending\n during a given iteration. These are stored as follows:\n\n istate\n *(Integer)* Initial state of transition event.\n fstate\n *(Integer)* Final state of transition event.\n duration\n *(Floating-point)* Duration of transition, in units of tau.\n weight\n *(Floating-point)* Weight of trajectory at end of transition, **not**\n normalized by initial state population.\n\nBecause state-to-state fluxes stored in this file are not normalized by\ninitial macrostate population, they cannot be used as rates without further\nprocessing. The ``w_direct kinetics`` command is used to perform this normalization\nwhile taking statistical fluctuation and correlation into account. See\n``w_direct kinetics --help`` for more information. Target fluxes (total flux\ninto a given state) require no such normalization.\n\n-----------------------------------------------------------------------------\nCommand-line options\n-----------------------------------------------------------------------------\n'
- go()
- help_text = 'calculate state-to-state kinetics by tracing trajectories'
- open_files()
- subcommand = 'init'
- class westpa.cli.tools.w_kinetics.WKinetics(parent)
Bases:
DKinetics
- subcommand = 'trace'
- help_text = 'averages and CIs for path-tracing kinetics analysis'
- default_output_file = 'kintrace.h5'
- class westpa.cli.tools.w_kinetics.WDirect
Bases:
WESTMasterCommand
,WESTParallelTool
- prog = 'w_kinetics'
- subcommands = [<class 'westpa.cli.tools.w_kinetics.WKinetics'>]
- subparsers_title = 'calculate state-to-state kinetics by tracing trajectories'
- description = 'Calculate state-to-state rates and transition event durations by tracing\ntrajectories.\n\nA bin assignment file (usually "assign.h5") including trajectory labeling\nis required (see "w_assign --help" for information on generating this file).\n\nThe output generated by this program is used as input for the ``w_kinavg``\ntool, which converts the flux data in the output file into average rates\nwith confidence intervals. See ``w_kinavg trace --help`` for more\ninformation.\n\n-----------------------------------------------------------------------------\nOutput format\n-----------------------------------------------------------------------------\n\nThe output file (-o/--output, by default "kintrace.h5") contains the\nfollowing datasets:\n\n ``/conditional_fluxes`` [iteration][state][state]\n *(Floating-point)* Macrostate-to-macrostate fluxes. These are **not**\n normalized by the population of the initial macrostate.\n\n ``/conditional_arrivals`` [iteration][stateA][stateB]\n *(Integer)* Number of trajectories arriving at state *stateB* in a given\n iteration, given that they departed from *stateA*.\n\n ``/total_fluxes`` [iteration][state]\n *(Floating-point)* Total flux into a given macrostate.\n\n ``/arrivals`` [iteration][state]\n *(Integer)* Number of trajectories arriving at a given state in a given\n iteration, regardless of where they originated.\n\n ``/duration_count`` [iteration]\n *(Integer)* The number of event durations recorded in each iteration.\n\n ``/durations`` [iteration][event duration]\n *(Structured -- see below)* Event durations for transition events ending\n during a given iteration. These are stored as follows:\n\n istate\n *(Integer)* Initial state of transition event.\n fstate\n *(Integer)* Final state of transition event.\n duration\n *(Floating-point)* Duration of transition, in units of tau.\n weight\n *(Floating-point)* Weight of trajectory at end of transition, **not**\n normalized by initial state population.\n\nBecause state-to-state fluxes stored in this file are not normalized by\ninitial macrostate population, they cannot be used as rates without further\nprocessing. The ``w_kinavg`` command is used to perform this normalization\nwhile taking statistical fluctuation and correlation into account. See\n``w_kinavg trace --help`` for more information. Target fluxes (total flux\ninto a given state) require no such normalization.\n\n-----------------------------------------------------------------------------\nCommand-line options\n-----------------------------------------------------------------------------\n'
- westpa.cli.tools.w_kinetics.entry_point()