w_postanalysis_matrix
westpa.cli.tools.w_postanalysis_matrix module
- class westpa.cli.tools.w_postanalysis_matrix.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_postanalysis_matrix.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_postanalysis_matrix.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_postanalysis_matrix.RWMatrix(parent)
Bases:
WESTKineticsBase
,FluxMatrix
- add_args(parser)
Add arguments specific to this component to the given argparse parser.
- default_kinetics_file = 'reweight.h5'
- default_output_file = 'reweight.h5'
- description = 'Generate a colored transition matrix from a WE assignment file. The subsequent\nanalysis requires that the assignments are calculated using only the initial and\nfinal time points of each trajectory segment. This may require downsampling the\nh5file generated by a WE simulation. In the future w_assign may be enhanced to optionally\ngenerate the necessary assignment file from a h5file with intermediate time points.\nAdditionally, this analysis is currently only valid on simulations performed under\neither equilibrium or steady-state conditions without recycling target states.\n\n-----------------------------------------------------------------------------\nOutput format\n-----------------------------------------------------------------------------\n\nThe output file (-o/--output, by default "reweight.h5") contains the\nfollowing datasets:\n\n ``/bin_populations`` [window, bin]\n The reweighted populations of each bin based on windows. Bins contain\n one color each, so to recover the original un-colored spatial bins,\n one must sum over all states.\n\n ``/iterations`` [iteration]\n *(Structured -- see below)* Sparse matrix data from each\n iteration. They are reconstructed and averaged within the\n w_reweight {kinetics/probs} routines so that observables may\n be calculated. Each group contains 4 vectors of data:\n\n flux\n *(Floating-point)* The weight of a series of flux events\n cols\n *(Integer)* The bin from which a flux event began.\n cols\n *(Integer)* The bin into which the walker fluxed.\n obs\n *(Integer)* How many flux events were observed during this\n iteration.\n\n-----------------------------------------------------------------------------\nCommand-line options\n-----------------------------------------------------------------------------\n'
- go()
- help_text = 'create a color-labeled transition matrix from a WESTPA simulation'
- process_args(args)
Take argparse-processed arguments associated with this component and deal with them appropriately (setting instance variables, etc)
- subcommand = 'init'
- class westpa.cli.tools.w_postanalysis_matrix.PAMatrix(parent)
Bases:
RWMatrix
- subcommand = 'init'
- help_text = 'averages and CIs for path-tracing kinetics analysis'
- default_output_file = 'flux_matrices.h5'
- class westpa.cli.tools.w_postanalysis_matrix.WReweight
Bases:
WESTMasterCommand
,WESTParallelTool
- prog = 'w_postanalysis_matrix'
- subcommands = [<class 'westpa.cli.tools.w_postanalysis_matrix.PAMatrix'>]
- subparsers_title = 'calculate state-to-state kinetics by tracing trajectories'
- description = 'Generate a colored transition matrix from a WE assignment file. The subsequent\nanalysis requires that the assignments are calculated using only the initial and\nfinal time points of each trajectory segment. This may require downsampling the\nh5file generated by a WE simulation. In the future w_assign may be enhanced to optionally\ngenerate the necessary assignment file from a h5file with intermediate time points.\nAdditionally, this analysis is currently only valid on simulations performed under\neither equilibrium or steady-state conditions without recycling target states.\n\n-----------------------------------------------------------------------------\nOutput format\n-----------------------------------------------------------------------------\n\nThe output file (-o/--output, by default "reweight.h5") contains the\nfollowing datasets:\n\n ``/bin_populations`` [window, bin]\n The reweighted populations of each bin based on windows. Bins contain\n one color each, so to recover the original un-colored spatial bins,\n one must sum over all states.\n\n ``/iterations`` [iteration]\n *(Structured -- see below)* Sparse matrix data from each\n iteration. They are reconstructed and averaged within the\n w_reweight {kinetics/probs} routines so that observables may\n be calculated. Each group contains 4 vectors of data:\n\n flux\n *(Floating-point)* The weight of a series of flux events\n cols\n *(Integer)* The bin from which a flux event began.\n cols\n *(Integer)* The bin into which the walker fluxed.\n obs\n *(Integer)* How many flux events were observed during this\n iteration.\n\n-----------------------------------------------------------------------------\nCommand-line options\n-----------------------------------------------------------------------------\n'
- westpa.cli.tools.w_postanalysis_matrix.entry_point()