Ejemplo n.º 1
0
__status__ = 'Production'

__doc__ += tcore.ref_mdt

_help = 'Removes solvent from trajectory.'
_name = 'nosol'

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_insort_arg(ap)
libcli.add_traj_output_arg(ap)
libcli.add_top_output_arg(ap)

ap.add_argument(
    '-m',
    '--maintain',
    help=('List of solvent residue names to maintain in trajectory. '
          'Feeds MDTraj.Trajectory.remove_solvent.exclude parameter.'),
    default=None,
    nargs='+',
)


def _ap():
    return ap
Ejemplo n.º 2
0
def test_insort(cmd, expected):
    """Test angle unit argument."""
    parser = argparse.ArgumentParser()
    lc.add_insort_arg(parser)
    v = vars(parser.parse_args(cmd.split()))
    assert v['insort'] == expected