Skip to content

Commit

Permalink
Add the option for people to use pyrosetta refinement if they have bo…
Browse files Browse the repository at this point in the history
…th installed
  • Loading branch information
brennanaba committed Oct 14, 2021
1 parent ec1f170 commit 86d63a7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ABlooper/command_line.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import argparse
from ABlooper.ABlooper import CDR_Predictor, openmm_available, rosetta_available


parser = argparse.ArgumentParser()
parser.add_argument("file_path", help="Path to the IMGT numbered antibody pdb file for which the CDRs are to be "
"remodelled")
Expand All @@ -16,6 +15,10 @@
parser.add_argument("-s", "--side_chains", help="Predict side chains and refine loop geometry",
default=False, action="store_true")

if rosetta_available:
parser.add_argument("-r", "--rosetta_refine", help="Use PyRosetta for refinement",
default=False, action="store_true")

args = parser.parse_args()


Expand All @@ -25,7 +28,9 @@ def main():
else:
side_chains = False

predictor = CDR_Predictor(args.file_path, chains=(args.heavy_chain, args.light_chain), refine=side_chains)
refine_method = "pyrosetta" if (args.rosetta_refine if rosetta_available else False) else "openmm"
predictor = CDR_Predictor(args.file_path, chains=(args.heavy_chain, args.light_chain), refine=side_chains,
refine_method=refine_method)
output_file = args.output

if output_file is None:
Expand Down

0 comments on commit 86d63a7

Please sign in to comment.