def get_arg_parser(): """Returns the custom argument parser for this script""" parser = fe.FEArgumentParser( description="High level script that attempts to use data from multiple" " calculations to provide free energies of solvation and " "binding. Also calculates cycle closures for all data. " "Assumes standard ProtoMS naming conventions for data " "output directories. Data should be organised such that " "each transformation between two ligands should have a " "single master directory containing output directories " "for each simulation state (e.g. master/out1_free). Master" "directories should be passed to the -d flag. " "Reported free energies are averages " "over all repeats found. Reported errors are single " "standard errors calculated from repeats.", parents=[fe.get_alchemical_arg_parser()], conflict_handler='resolve') parser.add_argument( '-d', '--directories', nargs='+', required=True, help="Location of folders containing ProtoMS output directories.") parser.add_argument( "-s", "--signs", nargs='+', type=str, choices=('+', '-'), help="List of '+' or '-' characters, one for each directory provided " "to the -d flag. Indicates the sign that should be used for each " "free energy difference when calculating cycle closures.", required=True) parser.add_argument('--estimators', nargs='+', default=['ti', 'mbar', 'bar'], choices=['ti', 'mbar', 'bar', 'gcap'], help="Choose estimators") parser.add_argument('-v', '--volume', type=float, default=None, help="Volume of GCMC region") # use mutually exclusive group for these as we need one and only one group = parser.add_mutually_exclusive_group(required=True) group.add_argument( "--dualtopology", action='store_true', default=False, help="Indicates data is for a dual topology calculation.") group.add_argument( "--singletopology", type=str, choices=('comb', 'sep'), help="Indicates data is for a single topology calculation. " "Option comb indicates a single step calculation. " "Option sep indicates separate steps for van der Waals " " and electrostatics components.") return parser
def get_arg_parser(): """Returns the custom argument parser for this script""" parser = fe.FEArgumentParser( description="Calculate individual contributions of different terms " "to the total free energy difference. Although terms are " "guaranteed to be additive with TI, the decomposition " "is not strictly well defined. That said, it can be " "illustrative to consider the dominant contributions of " "a calculation.", parents=[fe.get_alchemical_arg_parser()]) parser.add_argument( "-b", "--bound", nargs="+", action='append', help="Output directory(s) of additional bound phase calculation(s). " "Using this flag causes data loaded via -d to be considered as " "solvent phase data. All data is then combined to provide a " "decomposition of the binding free energy. Behaves identically " "to -d in treatment of repeats and calculation legs.", clashes=['gas']) parser.add_argument( "-g", "--gas", nargs="+", action='append', help="As -b except data loaded via this flag is treated as gas phase " "data to provide to provide a decomposed solvation free energy.", clashes=['bound']) parser.add_argument( "--dualtopology", action='store_true', default=False, help="Indicates provided data is from a dual topology calculation. " "Attempts to consolidate terms, for clarity, from ligands that " "can have opposite signs and large magnitudes. Please note that " "standard errors calculated with this approach are no longer " "rigorous and can be spuriously large.") parser.add_argument("--pmf", action='store_true', default=False, help="Plot the Potential of Mean Force for all terms.") parser.add_argument("--full", action='store_false', default=True, help="Prevents printing out of zero contribution energies.") return parser
def get_arg_parser(): """Add custom argument parser for this script""" parser = fe.FEArgumentParser( description="Calculate water binding free energies using Grand " "Canonical Integration.", parents=[fe.get_gci_arg_parser()], conflict_handler='resolve') return parser
def get_arg_parser(): """Add custom options for this script""" parser = fe.FEArgumentParser( description="Calculate water binding free energies using Grand " "Canonical Integration and incorporating rigorous " "corrections for long-range electrostatics and " "dispersion. Reweighting is carried out using both " "an umbrella sampling result and MBAR.", parents=[fe.get_gci_arg_parser()], conflict_handler='resolve') parser.add_argument( '-f', '--filename', default='results_inst', help="Name of file containing simulation energies with short cutoff." " Default=results_inst") parser.add_argument( '-ln', '--longname', default='results_long', help="Name of file containing simulation energies with long cutoff." " Default=results_long") return parser
def get_arg_parser(): """Returns the custom argument parser for this script""" parser = fe.FEArgumentParser( description="Calculate free energy differences using a range of" " estimators", parents=[fe.get_alchemical_arg_parser()]) parser.add_argument('--pmf', action='store_true', default=False, help="Make graph of potential of mean force", clashes=('test_convergence', 'test_equilibration')) parser.add_argument( '--test-equilibration', default=None, type=float, help="Perform free energy calculations 10 times using varying " "proportions of the total data set provided. Data used will " "range from 100%% of the dataset down to the proportion " "provided to this argument", clashes=('test_convergence', 'lower_bound')) parser.add_argument( '--test-convergence', default=None, type=float, help="Perform free energy calculations 10 times using varying " "proportions of the total data set provided. Data used will " "range from 100%% of the dataset up to the proportion " "provided to this argument") parser.add_argument( '--estimators', nargs='+', default=['ti', 'mbar', 'bar'], choices=['ti', 'mbar', 'bar', 'gcap'], help="Choose free energy estimator to use. By default TI, BAR and MBAR" " are used. Note that the GCAP estimator assumes a different file" " structure and ignores the --subdir flag.") parser.add_argument('-v', '--volume', type=float, default=None, help="Volume of GCMC region") return parser
def get_arg_parser(): """Returns the custom argument parser for this script""" parser = fe.FEArgumentParser( description="Calculate free energy differences using a range of" " estimators", parents=[fe.get_alchemical_arg_parser()]) parser.add_argument('-v', '--volume', type=float, default=None, help="Volume of GCMC region") parser.add_argument( '--estimators', nargs='+', default=['ti', 'mbar', 'bar'], choices=['ti', 'mbar', 'bar'], help="Choose free energy estimator to use. By default TI, BAR and MBAR" " are used. Note that the GCAP estimator assumes a different file" " structure and ignores the --subdir flag.") return parser