Exemplo n.º 1
0
def test_atom_selections_error(cmd):
    """Test atom selection error."""
    parser = argparse.ArgumentParser()
    lc.add_atom_selections_arg(parser)
    with pytest.raises(SystemExit):
        parser.parse_args(cmd.split())
Exemplo n.º 2
0
__doc__ += (f'{tcore.ref_mda}'
            f'{tcore.ref_mda_selection}'
            f'{tcore.ref_plottemplates_labeldots}')

_help = 'Calculate RMSFS for a selection and trajectory slice.'
_name = 'rmsf'

ap = libcli.CustomParser(
    description=_BANNER + __doc__,
    formatter_class=argparse.RawDescriptionHelpFormatter,
)

libcli.add_version_arg(ap)
libcli.add_topology_arg(ap)
libcli.add_trajectories_arg(ap)
libcli.add_atom_selections_arg(ap)
libcli.add_slice_arg(ap)
libcli.add_data_export_arg(ap)
libcli.add_plot_arg(ap)


def _ap():
    return ap


def main(topology,
         trajectories,
         start=None,
         stop=None,
         step=None,
         selections=None,
Exemplo n.º 3
0
def test_atom_selections_args(cmd, expected):
    """Test atom selection arg."""
    parser = argparse.ArgumentParser()
    lc.add_atom_selections_arg(parser)
    v = vars(parser.parse_args(cmd))
    assert v['selections'] == expected