1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38 package ffx.algorithms.cli;
39
40 import static java.lang.Integer.parseInt;
41
42 import ffx.algorithms.optimize.RotamerOptimization;
43 import ffx.algorithms.optimize.RotamerOptimization.Algorithm;
44 import ffx.numerics.math.DoubleMath;
45 import ffx.potential.MolecularAssembly;
46 import ffx.potential.bonded.*;
47
48 import java.io.File;
49 import java.util.*;
50 import java.util.logging.Logger;
51
52 import picocli.CommandLine.ArgGroup;
53 import picocli.CommandLine.Option;
54
55
56
57
58
59
60
61
62
63 public class ManyBodyOptions {
64
65 private static final Logger logger = Logger.getLogger(ManyBodyOptions.class.getName());
66
67
68
69
70 @ArgGroup(heading = "%n Many-Body Optimization Options%n", validate = false)
71 private final ManyBodyOptionGroup group = new ManyBodyOptionGroup();
72
73
74
75
76 @ArgGroup(heading = "%n Many-Body Box Optimization Options%n", validate = false)
77 private final BoxOptionGroup boxGroup = new BoxOptionGroup();
78
79
80
81
82 @ArgGroup(heading = "%n Many-Body Window Optimization Options%n", validate = false)
83 private final WindowOptionGroup windowGroup = new WindowOptionGroup();
84
85
86
87
88 @ArgGroup(heading = "%n Many-Body Energy Expansion and Cut-off Options%n", validate = false)
89 private final EnergyOptionGroup energyGroup = new EnergyOptionGroup();
90
91
92
93
94 @ArgGroup(heading = "%n Many-Body Residue Selection Options%n", validate = false)
95 private final ResidueOptionGroup residueGroup = new ResidueOptionGroup();
96
97 private RotamerOptimization rotamerOptimization;
98 private RotamerLibrary rotamerLibrary;
99
100
101
102
103
104
105
106 public void initRotamerOptimization(RotamerOptimization rotamerOptimization,
107 MolecularAssembly activeAssembly) {
108 this.rotamerOptimization = rotamerOptimization;
109
110
111 List<Residue> residues = collectResidues(activeAssembly);
112 rotamerOptimization.setResidues(residues);
113 rotamerOptimization.setRotamerLibrary(rotamerLibrary);
114
115
116 Algorithm algorithm = getAlgorithm(residues.size());
117
118
119 rotamerOptimization.setDecomposeOriginal(group.decompose);
120 rotamerOptimization.setUseGoldstein(!group.dee);
121 rotamerOptimization.setRevert(group.revert);
122 boolean monteCarloBool = group.monteCarlo > 1;
123 rotamerOptimization.setMonteCarlo(monteCarloBool, group.monteCarlo);
124 File energyRestartFile;
125 if (!group.energyRestart.equalsIgnoreCase("none")) {
126 energyRestartFile = new File(group.energyRestart);
127 rotamerOptimization.setEnergyRestartFile(energyRestartFile);
128 }
129
130
131 rotamerOptimization.setTwoBodyCutoff(energyGroup.twoBodyCutoff);
132 rotamerOptimization.setThreeBodyEnergy(energyGroup.threeBody);
133 rotamerOptimization.setThreeBodyCutoff(energyGroup.threeBodyCutoff);
134 rotamerOptimization.setDistanceCutoff(energyGroup.cutoff);
135 rotamerOptimization.setPruning(energyGroup.prune);
136 rotamerOptimization.setSingletonClashThreshold(energyGroup.clashThreshold);
137 rotamerOptimization.setPairClashThreshold(energyGroup.pairClashThreshold);
138
139
140 if (algorithm == Algorithm.WINDOW) {
141 rotamerOptimization.setWindowSize(windowGroup.window);
142 rotamerOptimization.setIncrement(windowGroup.increment);
143 } else if (algorithm == Algorithm.BOX) {
144
145 parseBoxSelection();
146 if (boxGroup.approxBoxLength < 0) {
147 logger.info(" Negative box length value changed to -1 * input.");
148 boxGroup.approxBoxLength *= -1;
149 }
150 rotamerOptimization.setBoxBorderSize(boxGroup.boxBorderSize);
151 rotamerOptimization.setApproxBoxLength(boxGroup.approxBoxLength);
152 rotamerOptimization.setNumXYZBoxes(boxGroup.numXYZBoxes);
153 rotamerOptimization.setBoxInclusionCriterion(boxGroup.boxInclusionCriterion);
154 rotamerOptimization.setBoxStart(boxGroup.initialBox);
155 rotamerOptimization.setBoxEnd(boxGroup.finalBox);
156 rotamerOptimization.setTitrationBoxes(boxGroup.boxTitration);
157 rotamerOptimization.setTitrationBoxSize(boxGroup.approxBoxLength);
158 }
159 }
160
161
162
163
164
165
166 public List<Residue> collectResidues(MolecularAssembly activeAssembly) {
167
168
169 initRotamerLibrary(true);
170
171
172 if (!residueGroup.listResidues.isEmpty() && !residueGroup.listResidues.equalsIgnoreCase("none")) {
173 List<String> stringList = new ArrayList<>();
174 String[] tok = residueGroup.listResidues.split(",");
175 Collections.addAll(stringList, tok);
176 List<Residue> residueList = new ArrayList<>();
177 Polymer[] polymers = activeAssembly.getChains();
178 for (String s : stringList) {
179 Character chainID = s.charAt(0);
180 int i = parseInt(s.substring(1));
181 for (Polymer polymer : polymers) {
182 if (polymer.getChainID() == chainID) {
183 List<Residue> residues = polymer.getResidues();
184 for (Residue residue : residues) {
185 if (residue.getResidueNumber() == i) {
186 Rotamer[] rotamers = residue.setRotamers(rotamerLibrary);
187 if (rotamers != null && rotamers.length > 0) {
188 residueList.add(residue);
189 }
190 }
191 }
192 }
193 }
194 }
195 return residueList;
196 }
197
198
199 if (residueGroup.finish < residueGroup.start) {
200 residueGroup.finish = Integer.MAX_VALUE;
201 }
202 Character chainID = null;
203 if (!residueGroup.chain.equalsIgnoreCase("-1")) {
204 chainID = residueGroup.chain.charAt(0);
205 }
206
207
208 List<Residue> residueList = new ArrayList<>();
209 Polymer[] polymers = activeAssembly.getChains();
210 for (Polymer polymer : polymers) {
211
212 if (chainID != null && chainID != polymer.getChainID()) {
213 continue;
214 }
215 List<Residue> residues = polymer.getResidues();
216 for (Residue residue : residues) {
217 int resID = residue.getResidueNumber();
218
219 if (resID >= residueGroup.start && resID <= residueGroup.finish) {
220 Rotamer[] rotamers = residue.setRotamers(rotamerLibrary);
221 if (rotamers != null) {
222 residueList.add(residue);
223 }
224 }
225 }
226 }
227
228 return residueList;
229 }
230
231
232
233
234
235
236 public Algorithm getAlgorithm(int numResidues) {
237 if (group.algorithm == 0) {
238 if (numResidues < 100) {
239 return Algorithm.ALL;
240 } else {
241 return Algorithm.BOX;
242 }
243 }
244 return Algorithm.getAlgorithm(group.algorithm);
245 }
246
247 public boolean getUsingOriginalCoordinates() {
248 return !group.noOriginal;
249 }
250
251 public void setOriginalCoordinates(boolean useOrig) {
252 group.noOriginal = !useOrig;
253 }
254
255 public double getApproximate() {
256 return rotamerOptimization.getApproximate();
257 }
258
259
260
261
262
263
264 public File getRestartFile() {
265 return rotamerOptimization.getRestartFile();
266 }
267
268 public RotamerLibrary getRotamerLibrary(boolean reinit) {
269 initRotamerLibrary(reinit);
270 return rotamerLibrary;
271 }
272
273 private void initRotamerLibrary(boolean reinit) {
274 if (rotamerLibrary == null || reinit) {
275 boolean useOrigCoordsRotamer = !group.noOriginal;
276 if (group.decompose) {
277 useOrigCoordsRotamer = true;
278 }
279 rotamerLibrary = new RotamerLibrary(
280 RotamerLibrary.ProteinLibrary.intToProteinLibrary(group.library), useOrigCoordsRotamer);
281 }
282 }
283
284
285
286 private void parseBoxSelection() {
287
288 String input = boxGroup.numBoxes;
289 Scanner boxNumInput = new java.util.Scanner(input);
290 boxNumInput.useDelimiter(",");
291 int inputLoopCounter = 0;
292 int[] numXYZBoxes = new int[3];
293 numXYZBoxes[0] = 3;
294 while (inputLoopCounter < 3) {
295 if (boxNumInput.hasNextInt()) {
296 numXYZBoxes[inputLoopCounter] = boxNumInput.nextInt();
297 inputLoopCounter++;
298 } else if (boxNumInput.hasNextDouble()) {
299 numXYZBoxes[inputLoopCounter] = (int) Math.floor(boxNumInput.nextDouble());
300 inputLoopCounter++;
301 logger.info(" Double input to nB truncated to integer.");
302 } else if (boxNumInput.hasNext()) {
303 logger.info(" Non-numeric input to nB discarded");
304 boxNumInput.next();
305 } else {
306 logger.info(
307 " Insufficient input to nB. Non-input values assumed either equal to X or default to 3");
308 break;
309 }
310 }
311 boxNumInput.close();
312
313
314 for (int i = inputLoopCounter; i < 3; i++) {
315 numXYZBoxes[i] = numXYZBoxes[0];
316 }
317
318
319 int totalCount = 1;
320 for (int i = 0; i < 3; i++) {
321 if (numXYZBoxes[i] == 0) {
322 numXYZBoxes[i] = 3;
323 logger.info(" Input of 0 to nB reset to default of 3.");
324 } else if (numXYZBoxes[i] < 0) {
325 numXYZBoxes[i] = -1 * numXYZBoxes[i];
326 logger.info(" Input of negative number to nB reset to positive number");
327 }
328 totalCount *= numXYZBoxes[i];
329 }
330
331 boxGroup.numXYZBoxes = numXYZBoxes;
332
333 if (boxGroup.initialBox < 0) {
334 boxGroup.initialBox = 0;
335 }
336 if (boxGroup.finalBox < 0 || boxGroup.finalBox > totalCount) {
337 boxGroup.finalBox = totalCount;
338 }
339
340 }
341
342
343 private void setRotOptProperties(Algorithm algorithm) {
344
345 }
346
347 public void setAlgorithm(int algorithm) {
348 group.algorithm = algorithm;
349 }
350
351
352
353
354
355
356 public int getLibrary() {
357 return group.library;
358 }
359
360 public void setLibrary(int library) {
361 group.library = library;
362 }
363
364
365
366
367
368
369 public String getNaLibraryName() {
370 return group.naLibraryName;
371 }
372
373 public void setNaLibraryName(String naLibraryName) {
374 group.naLibraryName = naLibraryName;
375 }
376
377
378
379
380
381
382 public boolean isDee() {
383 return group.dee;
384 }
385
386 public void setDee(boolean dee) {
387 group.dee = dee;
388 }
389
390
391
392
393
394
395 public String getChain() {
396 return residueGroup.chain;
397 }
398
399 public void setChain(String chain) {
400 residueGroup.chain = chain;
401 }
402
403 public boolean getOnlyTitration() {
404 return residueGroup.onlyTitration;
405 }
406
407 public void setOnlyTitration(boolean onlyTitration) {
408 residueGroup.onlyTitration = onlyTitration;
409 }
410
411 public int getInterestedResidue() {
412 return residueGroup.interestedResidue;
413 }
414
415 public void setInterestedResidue(int interestedResidue) {
416 residueGroup.interestedResidue = interestedResidue;
417 }
418
419 public double getInclusionCutoff() {
420 return residueGroup.inclusionCutoff;
421 }
422
423 public void setInclusionCutoff(double inclusionCutoff) {
424 residueGroup.inclusionCutoff = inclusionCutoff;
425 }
426
427
428
429
430
431
432
433 public int getStart() {
434 return residueGroup.start;
435 }
436
437 public void setStart(int start) {
438 residueGroup.start = start;
439 }
440
441
442
443
444
445
446
447 public int getFinish() {
448 return residueGroup.finish;
449 }
450
451 public void setFinish(int finish) {
452 residueGroup.finish = finish;
453 }
454
455
456
457
458
459
460 public double getTwoBodyCutoff() {
461 return energyGroup.twoBodyCutoff;
462 }
463
464 public void setTwoBodyCutoff(double twoBodyCutoff) {
465 energyGroup.twoBodyCutoff = twoBodyCutoff;
466 }
467
468
469
470
471
472
473 public boolean isThreeBody() {
474 return energyGroup.threeBody;
475 }
476
477 public void setThreeBody(boolean threeBody) {
478 energyGroup.threeBody = threeBody;
479 }
480
481
482
483
484
485
486 public double getThreeBodyCutoff() {
487 return energyGroup.threeBodyCutoff;
488 }
489
490 public void setThreeBodyCutoff(double threeBodyCutoff) {
491 energyGroup.threeBodyCutoff = threeBodyCutoff;
492 }
493
494
495
496
497
498
499 public int getPrune() {
500 return energyGroup.prune;
501 }
502
503 public void setPrune(int prune) {
504 energyGroup.prune = prune;
505 }
506
507
508
509
510
511
512 public boolean isRevert() {
513 return group.revert;
514 }
515
516 public void setRevert(boolean revert) {
517 group.revert = revert;
518 }
519
520
521
522
523
524
525 public String getEnergyRestart() {
526 return group.energyRestart;
527 }
528
529 public void setEnergyRestart(String energyRestart) {
530 group.energyRestart = energyRestart;
531 }
532
533
534
535
536
537
538 public boolean isNoOriginal() {
539 return group.noOriginal;
540 }
541
542 public void setNoOriginal(boolean noOriginal) {
543 group.noOriginal = noOriginal;
544 }
545
546
547
548
549
550
551 public boolean isDecompose() {
552 return group.decompose;
553 }
554
555 public void setDecompose(boolean decompose) {
556 group.decompose = decompose;
557 }
558
559
560
561
562
563
564 public String getListResidues() {
565 return residueGroup.listResidues;
566 }
567
568 public void setListResidues(String listResidues) {
569 residueGroup.listResidues = listResidues;
570 }
571
572
573
574
575
576
577
578 public int getMonteCarlo() {
579 return group.monteCarlo;
580 }
581
582 public void setMonteCarlo(int monteCarlo) {
583 group.monteCarlo = monteCarlo;
584 }
585
586
587
588
589
590
591 public boolean isSaveOutput() {
592 return group.saveOutput;
593 }
594
595 public void setSaveOutput(boolean saveOutput) {
596 group.saveOutput = saveOutput;
597 }
598
599
600
601
602
603
604 public int getWindow() {
605 return windowGroup.window;
606 }
607
608 public void setWindow(int window) {
609 windowGroup.window = window;
610 }
611
612
613
614
615
616
617 public int getIncrement() {
618 return windowGroup.increment;
619 }
620
621 public void setIncrement(int increment) {
622 windowGroup.increment = increment;
623 }
624
625
626
627
628
629
630 public double getCutoff() {
631 return energyGroup.cutoff;
632 }
633
634 public void setCutoff(double cutoff) {
635 energyGroup.cutoff = cutoff;
636 }
637
638
639
640
641
642
643
644 public double getClashThreshold() {
645 return energyGroup.clashThreshold;
646 }
647
648 public void setClashThreshold(double clashThreshold) {
649 energyGroup.clashThreshold = clashThreshold;
650 }
651
652
653
654
655
656
657
658 public double getPairClashThreshold() {
659 return energyGroup.pairClashThreshold;
660 }
661
662 public void setPairClashThreshold(double pairClashThreshold) {
663 energyGroup.pairClashThreshold = pairClashThreshold;
664 }
665
666
667
668
669
670
671 public String getNumBoxes() {
672 return boxGroup.numBoxes;
673 }
674
675 public void setNumBoxes(String numBoxes) {
676 boxGroup.numBoxes = numBoxes;
677 }
678
679
680
681
682
683
684 public double getBoxBorderSize() {
685 return boxGroup.boxBorderSize;
686 }
687
688 public void setBoxBorderSize(double boxBorderSize) {
689 boxGroup.boxBorderSize = boxBorderSize;
690 }
691
692
693
694
695
696
697
698
699 public double getApproxBoxLength() {
700 return boxGroup.approxBoxLength;
701 }
702
703 public void setApproxBoxLength(double approxBoxLength) {
704 boxGroup.approxBoxLength = approxBoxLength;
705 }
706
707
708
709
710
711
712
713 public int getBoxInclusionCriterion() {
714 return boxGroup.boxInclusionCriterion;
715 }
716
717 public void setBoxInclusionCriterion(int boxInclusionCriterion) {
718 boxGroup.boxInclusionCriterion = boxInclusionCriterion;
719 }
720
721 public void setBoxTitration(boolean boxTitration){boxGroup.boxTitration = boxTitration;}
722
723 public boolean getBoxTitration(){return boxGroup.boxTitration;}
724
725 public void setTitrationPH(double pH) {
726 group.titrationPH = pH;
727 }
728
729 public double getTitrationPH() {
730 return group.titrationPH;
731 }
732
733 public void setPHRestraint(double pHRestraint) {
734 energyGroup.pHRestraint = pHRestraint;
735 }
736
737 public double getPHRestraint() {
738 return energyGroup.pHRestraint;
739 }
740
741 public boolean isTitrating() {
742 return group.titrationPH == 0;
743 }
744
745 public boolean getTitration() {
746 return group.titration;
747 }
748
749 public String selectInclusionResidues(final List<Residue> residueList, int mutatingResidue, boolean onlyTitration,
750 double inclusionCutoff){
751 String listResidues = "";
752 if (mutatingResidue != -1 && inclusionCutoff != -1) {
753 List<Integer> residueNumber = new ArrayList<>();
754 for (Residue residue : residueList) {
755 residueNumber.add(residue.getResidueNumber());
756 }
757 double[] mutatingResCoor = new double[3];
758 int index = residueNumber.indexOf(mutatingResidue);
759 mutatingResCoor = residueList.get(index).getAtomByName("CA", true).getXYZ(mutatingResCoor);
760 for (Residue residue: residueList) {
761 double[] currentResCoor = new double[3];
762 currentResCoor = residue.getAtomByName("CA", true).getXYZ(currentResCoor);
763 double dist = DoubleMath.dist(mutatingResCoor, currentResCoor);
764 if (dist < inclusionCutoff) {
765 listResidues += "," + residue.getChainID() + residue.getResidueNumber();
766 }
767 }
768 listResidues = listResidues.substring(1);
769 } else if (onlyTitration){
770 String[] titratableResidues = new String[]{"HIS", "HIE", "HID", "GLU", "GLH", "ASP", "ASH", "LYS", "LYD", "CYS", "CYD"};
771 List<String> titratableResiudesList = Arrays.asList(titratableResidues);
772 for (Residue residue : residueList) {
773 if (titratableResiudesList.contains(residue.getName())) {
774 String titrateResNum = Integer.toString(residue.getResidueNumber());
775 if(!listResidues.contains(titrateResNum)){
776 listResidues += "," + residue.getChainID()+ titrateResNum;
777 }
778 if (inclusionCutoff != -1){
779 for (Residue residue2: residueList) {
780 boolean includeResidue = evaluateAllRotDist(residue, residue2, inclusionCutoff);
781 if(includeResidue){
782 String residue2Number = Integer.toString(residue2.getResidueNumber());
783 if(!listResidues.contains(residue2Number)){
784 listResidues += "," + residue2.getChainID()+ residue2Number;
785 }
786 }
787 }
788 }
789
790 }
791
792 }
793
794 listResidues = listResidues.substring(1);
795 }
796 return listResidues;
797 }
798 private static boolean evaluateAllRotDist(Residue residueA, Residue residueB, double inclusionCutoff){
799 residueA.setRotamers(RotamerLibrary.getDefaultLibrary());
800 residueB.setRotamers(RotamerLibrary.getDefaultLibrary());
801 Rotamer[] rotamersA = residueA.getRotamers();
802 Rotamer[] rotamersB = residueB.getRotamers();
803 double[] aCoor = new double[3];
804 double[] bCoor = new double[3];
805 try {
806 int a = rotamersA.length;
807 int b = rotamersB.length;
808 } catch (Exception e){
809 return false;
810 }
811
812 for(Rotamer rotamerA: rotamersA){
813 residueA.setRotamer(rotamerA);
814 for(Rotamer rotamerB: rotamersB){
815 residueB.setRotamer(rotamerB);
816 for(Atom atomA: residueA.getAtomList()){
817 for(Atom atomB: residueB.getAtomList()){
818 double dist = DoubleMath.dist(atomA.getXYZ(aCoor), atomB.getXYZ(bCoor));
819 if(dist <= inclusionCutoff){
820 return true;
821 }
822 }
823 }
824 }
825 }
826
827 return false;
828 }
829
830
831
832
833
834 private static class ManyBodyOptionGroup {
835
836
837
838
839
840 @Option(names = {"-a",
841 "--algorithm"}, paramLabel = "0", defaultValue = "0", description = "Algorithm: default automatic settings (0), independent residues (1), all with rotamer elimination (2), all brute force (3), sliding window (4), or box optimization (5)")
842 private int algorithm;
843
844
845 @Option(names = {"-L",
846 "--library"}, paramLabel = "2", defaultValue = "2", description = "Ponder and Richards (1) or Richardson (2) rotamer library.")
847 private int library;
848
849
850
851
852
853
854
855 private String naLibraryName = "Richardson";
856
857
858 @Option(names = {"--dee",
859 "--deadEnd"}, paramLabel = "false", defaultValue = "false", description = "Use dead-end elimination criteria instead of Goldstein criteria.")
860 private boolean dee;
861
862
863 @Option(names = {"-z",
864 "--revert"}, defaultValue = "true", description = "Revert unfavorable changes.")
865 private boolean revert;
866
867
868
869
870
871 @Option(names = {"--eR",
872 "--energyRestart"}, paramLabel = "none", defaultValue = "none", description = "Load energy restart file from a previous run (requires that all parameters are the same).")
873 private String energyRestart;
874
875
876 @Option(names = {"-O",
877 "--noOriginal"}, defaultValue = "false", description = "Do not include starting coordinates as their own rotamer.")
878 private boolean noOriginal;
879
880
881 @Option(names = {"-E",
882 "--decompose"}, defaultValue = "false", description = "Print energy decomposition for the input structure (no optimization!).")
883 private boolean decompose;
884
885
886
887
888 @Option(names = {"--pH",
889 "--titrationPH"}, paramLabel = "0", defaultValue = "0", description = " Optimize the titration state of ASP, GLU, HIS and LYS residues at the given pH (pH = 0 turns off titration")
890 private double titrationPH;
891
892
893
894
895 @Option(names = {"--tR",
896 "--titration"}, paramLabel = "false", defaultValue = "false", description = " Turn on titration state optimization")
897 private boolean titration;
898
899
900
901
902
903 @Option(names = {"--mC",
904 "--monteCarlo"}, paramLabel = "-1", defaultValue = "-1", description = "Follow elimination criteria with (n) Monte Carlo steps, or enumerate all remaining conformations, whichever is smaller.")
905 private int monteCarlo;
906
907
908
909
910
911
912
913
914
915 private boolean saveOutput;
916
917 }
918
919
920
921
922 private static class BoxOptionGroup {
923
924
925 @Option(names = {"--nB",
926 "--numBoxes"}, paramLabel = "3,3,3", defaultValue = "3,3,3", description = "Specify number of boxes along X, Y, and Z (default: 3,3,3)")
927 private String numBoxes;
928
929
930
931
932 private int[] numXYZBoxes;
933
934
935 @Option(names = {"--bB",
936 "--boxBorderSize"}, paramLabel = "0.0", defaultValue = "0.0", description = "Extent of overlap between optimization boxes in Angstroms.")
937 private double boxBorderSize;
938
939
940
941
942
943
944 @Option(names = {"--bL",
945 "--approxBoxLength"}, paramLabel = "20.0", defaultValue = "20.0", description = "Approximate side lengths of boxes to be constructed (over-rides numXYZBoxes).")
946 private double approxBoxLength;
947
948
949
950
951
952 @Option(names = {"--bC",
953 "--boxInclusionCriterion"}, paramLabel = "1", defaultValue = "1", description = "Criterion to use for adding a residue to a box: (1) uses C alpha only (N1/9 for nucleic acids), (2) uses any atom, and (3) uses any rotamer")
954 private int boxInclusionCriterion;
955
956
957
958
959 @Option(names = {"--iB", "--initialBox"}, defaultValue = "0", description = "Initial box to optimize.")
960 private int initialBox;
961
962
963
964
965 @Option(names = {"--fB", "--finalBox"}, defaultValue = "2147483647",
966 description = "Final box to optimize.")
967 private int finalBox;
968
969
970
971
972 @Option(names = {"--bT", "--boxTitration"}, defaultValue = "false",
973 description = "Center boxes around titratable residues.")
974 private boolean boxTitration;
975
976 }
977
978
979
980
981 private static class WindowOptionGroup {
982
983
984 @Option(names = {
985 "--window"}, paramLabel = "7", defaultValue = "7", description = "Size of the sliding window with respect to adjacent residues.")
986 private int window;
987
988
989 @Option(names = {
990 "--increment"}, paramLabel = "3", defaultValue = "3", description = "Sliding window increment.")
991 private int increment;
992
993 }
994
995
996
997
998 private static class EnergyOptionGroup {
999
1000
1001 @Option(names = {
1002 "--radius"}, paramLabel = "2.0", defaultValue = "2.0", description = "The sliding box and window cutoff radius (Angstroms).")
1003 private double cutoff;
1004
1005
1006 @Option(names = {"--tC",
1007 "--twoBodyCutoff"}, paramLabel = "3.0", defaultValue = "3.0", description = "Cutoff distance for two body interactions.")
1008 private double twoBodyCutoff;
1009
1010
1011 @Option(names = {"-T",
1012 "--threeBody"}, defaultValue = "false", description = "Include 3-Body interactions in the elimination criteria.")
1013 private boolean threeBody;
1014
1015
1016 @Option(names = {"--thC",
1017 "--threeBodyCutoff"}, paramLabel = "3.0", defaultValue = "3.0", description = "Cutoff distance for three-body interactions.")
1018 private double threeBodyCutoff;
1019
1020
1021 @Option(names = {"--pr",
1022 "--prune"}, paramLabel = "1", defaultValue = "1", description = "Prune no clashes (0), only single clashes (1), or all clashes (2)")
1023 private int prune;
1024
1025
1026
1027
1028
1029 @Option(names = {
1030 "--clashThreshold"}, paramLabel = "25.0", defaultValue = "25.0", description = "The threshold for pruning clashes.")
1031 private double clashThreshold;
1032
1033
1034
1035
1036
1037
1038 @Option(names = {
1039 "--pairClashThreshold"}, paramLabel = "25.0", defaultValue = "25.0", description = "The threshold for pruning pair clashes.")
1040 private double pairClashThreshold;
1041
1042
1043 @Option(names = {
1044 "--kPH", "--pHRestraint"}, paramLabel = "0.0", defaultValue = "0.0", description = "Only allow titration state to change from" +
1045 "standard state is self energy exceeds the restraint.")
1046 private double pHRestraint = 0;
1047 }
1048
1049
1050
1051
1052 private static class ResidueOptionGroup {
1053
1054
1055 @Option(names = {"--ch",
1056 "--chain"}, paramLabel = "<A>", defaultValue = "-1", description = "Include only specified chain ID (default: all chains).")
1057 private String chain;
1058
1059
1060
1061
1062 @Option(names = {"--sR", "--start"}, defaultValue = "-2147483648",
1063 description = "Starting residue to optimize (default: all residues).")
1064 private int start;
1065
1066
1067
1068
1069 @Option(names = {"--fR",
1070 "--final"}, paramLabel = "<final>", defaultValue = "2147483647",
1071 description = "Final residue to optimize (default: all residues).")
1072 private int finish;
1073
1074
1075 @Option(names = {"--lR",
1076 "--listResidues"}, paramLabel = "<list>", defaultValue = "none", description = "Select a list of residues to optimize (eg. A11,A24,B40).")
1077 private String listResidues;
1078
1079
1080 @Option(names = {"--oT",
1081 "--onlyTitration"}, paramLabel = "", defaultValue = "false", description = "Rotamer optimize only titratable residues.")
1082 private boolean onlyTitration;
1083
1084
1085 @Option(names = {"--iR",
1086 "--interestedResidue"}, paramLabel = "", defaultValue = "-1", description = "Optimize rotamers within some distance of a specific residue.")
1087 private int interestedResidue = -1;
1088
1089
1090 @Option(names = {"--iC",
1091 "--inclusionCutoff"}, paramLabel = "", defaultValue = "-1", description = "Distance which rotamers will be included when using only protons, titratable residues, or interested residue.")
1092 private double inclusionCutoff = -1;
1093
1094 }
1095
1096 }