Trees | Indices | Help |
|
---|
|
object --+ | argparse._AttributeHolder --+ | object --+ | | | argparse._ActionsContainer --+ | argparse.ArgumentParser --+ | CommandLine
Use this class to define common command line arguments such input cms file, input trajectory, output file base name, trajectory slicing option, and so on. After calling L{parse_args} method, you will have those arguments parsed properly, and you will get the L{cms.Cms} object, the L{msys.System} object, and the trajectory object (sliced properly), automatically. You can use the C{spec} argument to custom your command line interface. Examples: 1: spec = REQUIRE_MSYS_CMS + REQUIRE_TRJ + REQUIRE_OUT + SLICE_TRJ # This will give you the following: # cms - First positional argument for cms input, and when it's parsed, # you will get both msys and cms models. # trj - Second positional argument for trajectory input # out - Third positional argument for output base name # -slice-trj # - Option for slicing trajectory 2: spec = REQUIRE_CMS_ONLY + REQUIRE_TRJ + REQUIRE_OUT + SLICE_TRJ # Similar to the first example, but parsing the cms input file will return # only the cms model. 3: spec = REQUIRE_CMS_ONLY + OPTIONAL_TRJ + REQUIRE_OUT + SLICE_TRJ # This will give you the following: # cms - First positional argument for cms input, and when it's parsed, # you will get the cms models. # out - Second positional argument for output base name # -trj - Option for trajectory input # -slice-trj # - Option for slicing trajectory Other standard options: -ref-mae Reference geometry from given .mae or .cms file. After parsing, the .ref_mae attribute will provide C{(structure.Structure, str)}, where the first element is the C{Structure} object of the file and the second the file's name. If this option is unspecified, the attribute' value will be C{None}. spec: REF_MAE -ref-frame Reference geometry from a trajectory frame. After parsing, the .ref_frame attribute will provide C{(traj.Frame, int)}, where the first element is the specified frame and the second the index of the frame. If this option is overridden by -ref-mae, or if the trajectory is not provided, the attribute's value will be C{None}. spec: REF_FRAME
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
|
|||
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue May 2 06:33:08 2017 | http://epydoc.sourceforge.net |