pycgtool.__main__

Module Contents

Classes

PyCGTOOL

BooleanAction

Set up a boolean argparse argument with matching –no argument.

Functions

parse_arguments(arg_list)

validate_arguments(args)

Check that arguments are not contradictory and modify where necessary.

main()

Attributes

PathLike

logger

pycgtool.__main__.PathLike
pycgtool.__main__.logger
exception pycgtool.__main__.ArgumentValidationError[source]

Bases: ValueError

Exception raised for invalid combinations of command line arguments.

class pycgtool.__main__.PyCGTOOL(config)[source]
get_output_filepath(self, ext: PathLike)pathlib.Path[source]

Get file path for an output file by extension.

Creates the output directory if missing.

apply_mapping(self, in_frame: pycgtool.frame.Frame)Tuple[pycgtool.mapping.Mapping, pycgtool.frame.Frame][source]

Map input frame to output using requested mapping file.

measure_bonds(self)None[source]

Measure bonds at the end of a run.

train_backmapper(self, resname: str)[source]
class pycgtool.__main__.BooleanAction(option_strings, dest, nargs=None, **kwargs)[source]

Bases: argparse.Action

Set up a boolean argparse argument with matching –no argument.

Based on https://thisdataguy.com/2017/07/03/no-options-with-argparse-and-python/

__call__(self, parser, namespace, values, option_string=None)[source]
pycgtool.__main__.parse_arguments(arg_list)[source]
pycgtool.__main__.validate_arguments(args)[source]

Check that arguments are not contradictory and modify where necessary.

Parameters

args – Parsed arguments from ArgumentParser

pycgtool.__main__.main()[source]