Skip to content

Commit 031ff34

Browse files
committed
add option to exclude one interface
1 parent 8836f4a commit 031ff34

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/DockQ/DockQ.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,12 @@ def parse_args():
103103
in the interface between chains B and C, the flag can be set as: '--mapping :BC'
104104
or the equivalent '--mapping *:BC'.""",
105105
)
106-
106+
parser.add_argument(
107+
"--exclude_interface",
108+
default=None,
109+
metavar="NATIVECHAIN1_NATIVECHAIN2",
110+
help="""Exclude one pair of chains from the results (automatic mapping will still keep all chains into account)""",
111+
)
107112
return parser.parse_args()
108113

109114

@@ -878,6 +883,7 @@ def main():
878883
native_chains = (
879884
[c.id for c in native_structure] if not native_chains else native_chains
880885
)
886+
excluded_native_chains = "".join(args.exclude_interface.split("_")) if args.exclude_interface else None
881887

882888
if len(model_chains) < 2 or len(native_chains) < 2:
883889
print("Need at least two chains in the two inputs\n")
@@ -966,6 +972,9 @@ def main():
966972
)
967973
sys.exit(1)
968974

975+
if excluded_native_chains is not None:
976+
best_result = {chains:result for chains, result in best_result.items() if chains not in excluded_native_chains}
977+
969978
info = dict()
970979
info["model"] = args.model
971980
info["native"] = args.native

0 commit comments

Comments
 (0)