From 6f42f355135fc90183028743f5df87d5294eaeef Mon Sep 17 00:00:00 2001 From: James Graham <j.graham@soton.ac.uk> Date: Wed, 17 Mar 2021 21:15:00 +0000 Subject: [PATCH] refactor: add warning that backmap is experimental Also remove unused --map-only CLI option --- docs/source/index.rst | 1 - pycgtool/__main__.py | 17 ++++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index fc11bdb..9050812 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -165,7 +165,6 @@ Option Description Values output_name Base name of output files **out**, any string output Coordinate output format **gro** output_xtc Should a pseudo-CG XTC be created **False**, True -map_only Run in mapping-only mode **False**, True map_center Mapping method **geom**, mass virtual_map_center Virtual site mapping method **geom**, mass constr_threshold Convert stiff bonds to constraints over **100000**, any number diff --git a/pycgtool/__main__.py b/pycgtool/__main__.py index b2b589c..77f770a 100755 --- a/pycgtool/__main__.py +++ b/pycgtool/__main__.py @@ -168,8 +168,6 @@ def parse_arguments(arg_list): # Mapping options mapping_options = parser.add_argument_group("mapping options") - mapping_options.add_argument("--map-only", '--no-map-only', default=False, action=BooleanAction, - help="Run in mapping-only mode?") mapping_options.add_argument("--map-center", default="geom", choices=["geom", "mass", "first"], help="Mapping method") @@ -182,7 +180,7 @@ def parse_arguments(arg_list): # Bond options bond_options = parser.add_argument_group("bond options") - bond_options.add_argument("--constr_threshold", type=float, default=100000, + bond_options.add_argument("--constr-threshold", type=float, default=100000, help="Convert bonds with force constants over [value] to constraints") bond_options.add_argument("--temperature", type=float, default=310, help="Temperature of reference simulation") @@ -227,12 +225,17 @@ def validate_arguments(args): """ if not args.dump_measurements: args.dump_measurements = bool(args.bondset) and not bool(args.mapping) - - if not args.map_only: - args.map_only = not bool(args.bondset) + logger.info( + 'Argument --dump-measurements has been set because you have provided a bondset but no mapping' + ) if not args.mapping and not args.bondset: - raise ArgumentValidationError("One or both of -m and -b is required.") + raise ArgumentValidationError('One or both of -m and -b is required') + + if args.backmapper_resname: + logger.warning( + 'Backmapping is an experimental feature and has not yet been fully validated' + ) return args -- GitLab