diff --git a/pdb2pqr/config.py b/pdb2pqr/config.py index f3c6094..a85e00d 100644 --- a/pdb2pqr/config.py +++ b/pdb2pqr/config.py @@ -5,6 +5,13 @@ VERSION = __version__ +#: Options for PROPKA that PDB2PQR cannot handle +IGNORED_PROPKA_OPTIONS = [ + "thermophiles", "chains", "alignment", "mutations", "mutator", + "mutator_options", "reuse_ligand_mol2_file", "keep_protons", + "protonate_all" +] + #: How to format PDB2PQR title in output TITLE_STR = f"PDB2PQR v{VERSION}: biomolecular structure conversion software." diff --git a/pdb2pqr/main.py b/pdb2pqr/main.py index e886801..17bd910 100644 --- a/pdb2pqr/main.py +++ b/pdb2pqr/main.py @@ -26,7 +26,7 @@ from .ligand.mol2 import Mol2Molecule from .utilities import noninteger_charge from .config import VERSION, TITLE_STR, CITATIONS, FORCE_FIELDS -from .config import REPAIR_LIMIT +from .config import REPAIR_LIMIT, IGNORED_PROPKA_OPTIONS _LOGGER = logging.getLogger(f"PDB2PQR{VERSION}") @@ -279,6 +279,13 @@ def check_options(args): :type args: argparse.Namespace :raises RuntimeError: silly option combinations were encountered. """ + for option in IGNORED_PROPKA_OPTIONS: + if option in args: + _LOGGER.warn( + f"PROPKA option '{option}' is not processed correctly by " + f"PDB2PQR. Ignoring." + ) + args.__dict__.pop(option) if (args.ph < 0) or (args.ph > 14): err = ( f"Specified pH ({args.ph}) is outside the range "