diff --git a/meeko/cli/mk_prepare_ligand.py b/meeko/cli/mk_prepare_ligand.py index aa5d87c..6533ffe 100755 --- a/meeko/cli/mk_prepare_ligand.py +++ b/meeko/cli/mk_prepare_ligand.py @@ -81,7 +81,7 @@ def cmd_lineparser(): io_group.add_argument( "--charge_from_prop", nargs="*", - help="set atom partial charges from the input file. The default is PartialCharge for SDF and _TriposPartialCharge for MOL2 unless overriden by a user defined property name. ", + help="set atom partial charges from an RDKit atom property based on the input file. The default is 'PartialCharge' for SDF and '_TriposPartialCharge' for MOL2 unless overriden by a user defined property name. ", ) io_group.add_argument( "-o", @@ -555,19 +555,20 @@ def main(): ) nr_failures = 0 is_after_first = False - preparator = MoleculePreparation.from_config(config) if args.charge_from_prop is not None: if args.charge_model != "read": print('--charge_from_prop must be used with --charge_model "read"') sys.exit(1) - preparator.charge_model = "read" + config["charge_model"] = "read" if args.charge_from_prop: - preparator.charge_atom_prop = args.charge_from_prop[0] + config["charge_atom_prop"] = args.charge_from_prop[0] else: if ext=="mol2": - preparator.charge_atom_prop = "_TriposPartialCharge" + config["charge_atom_prop"] = "_TriposPartialCharge" + + preparator = MoleculePreparation.from_config(config) for mol in mol_supplier: if is_after_first and output.is_multimol == False: