def test_map_only(self): logging.disable(logging.WARNING) map_only(Args("sugar"), self.config) logging.disable(logging.NOTSET) xtc = XtcTrajectory("out.xtc") xtc_ref = XtcTrajectory("test/data/sugar_out.xtc") self.assertEqual(xtc_ref.numframes, xtc.numframes) for i in range(xtc_ref.numframes): xtc.get_frame(i) xtc_ref.get_frame(i) np.testing.assert_array_almost_equal(xtc_ref.box, xtc.box, decimal=3) np.testing.assert_array_almost_equal(xtc_ref.x, xtc.x, decimal=3)
("dump_measurements", bool(args.bnd) and not bool(args.map)), ("dump_n_values", 10000), ("output_forcefield", False), ("temperature", 310), ("default_fc", False), ("generate_angles", True), ("generate_dihedrals", False), ("length_form", "harmonic"), ("angle_form", "cosharmonic"), ("dihedral_form", "harmonic"), ], args, ) if not args.map and not args.bnd: parser.error("One or both of -m and -b is required.") if args.advanced: try: config.interactive() except KeyboardInterrupt: sys.exit(0) else: print("Using GRO: {0}".format(args.gro)) print("Using XTC: {0}".format(args.xtc)) if config.map_only: map_only(args, config) else: main(args, config)
func_forms = FunctionalForms() args = parser.parse_args() config = Options( [("output_name", "out"), ("output", "gro"), ("output_xtc", args.outputxtc), ("map_only", not bool(args.bnd)), ("map_center", "geom"), ("constr_threshold", 100000), ("dump_measurements", bool(args.bnd) and not bool(args.map)), ("dump_n_values", 10000), ("output_forcefield", False), ("temperature", 310), ("default_fc", False), ("generate_angles", True), ("generate_dihedrals", False), ("length_form", "harmonic"), ("angle_form", "cosharmonic"), ("dihedral_form", "harmonic")], args) if not args.map and not args.bnd: parser.error("One or both of -m and -b is required.") if args.advanced: try: config.interactive() except KeyboardInterrupt: sys.exit(0) else: print("Using GRO: {0}".format(args.gro)) print("Using XTC: {0}".format(args.xtc)) if config.map_only: map_only(args, config) else: main(args, config)