001/*
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 * Created on Sep 15, 2009
021 * Author: Andreas Prlic
022 *
023 */
024
025package org.biojava.nbio.structure.align.ce;
026
027import java.util.List;
028
029/** Contains the parameters that can be sent to CE
030 *
031 * @author Andreas Prlic
032 *
033 */
034public class OptimalCECPParameters extends CeParameters {
035        /**
036         * If true, ignores {@link #cpPoint} and tries all possible cp points.
037         */
038        protected Boolean tryAllCPs;
039        /**
040         * The CP point, specified as a residue index
041         *
042         * <p>TODO make this a ResidueNumber
043         */
044        protected Integer cpPoint;
045
046        @Override
047        public String toString() {
048                return "OptimalCECPParameters [scoringStrategy=" + scoringStrategy
049                + ", maxGapSize=" + maxGapSize
050                + ", rmsdThr=" + rmsdThr
051                + ", rmsdThrJoin="+ rmsdThrJoin
052                + ", winSize=" + winSize
053                + ", showAFPRanges=" + showAFPRanges
054                + ", maxOptRMSD=" + maxOptRMSD
055                + ", seqWeight=" + seqWeight
056                + ", tryAllCPs" + tryAllCPs
057                + ", cpPoint" + cpPoint
058                + "]";
059        }
060
061
062        @Override
063        public void reset(){
064                super.reset();
065                tryAllCPs = true;
066                cpPoint = 0;
067        }
068
069
070        @Override
071        public List<String> getUserConfigHelp() {
072                List<String> params = super.getUserConfigHelp();
073                params.add("Should we try all CP sites? Otherwise, only try the site specified by CPPoint.");
074                params.add("Index of the CP site. Ignored unless TryAllCPs=false");
075                return params;
076        }
077
078        @Override
079        public List<String> getUserConfigParameters() {
080                List<String> params = super.getUserConfigParameters();
081                params.add("TryAllCPs");
082                params.add("CPPoint");
083                return params;
084        }
085
086        @Override
087        public List<String> getUserConfigParameterNames(){
088                List<String> params = super.getUserConfigParameterNames();
089
090                params.add("Try all CPs");
091                params.add("CP Point");
092                return params;
093        }
094
095        @Override
096        @SuppressWarnings("rawtypes")
097        public List<Class> getUserConfigTypes() {
098                List<Class> params = super.getUserConfigTypes();
099                params.add(Boolean.class);
100                params.add(Integer.class);
101                return params;
102        }
103
104
105        /**
106         * @return Whether we should try all CP sites
107         */
108        public Boolean isTryAllCPs() {
109                return tryAllCPs;
110        }
111
112
113        /**
114         * @param tryAllCPs Set whether we should try all CP sites
115         */
116        public void setTryAllCPs(Boolean tryAllCPs) {
117                this.tryAllCPs = tryAllCPs;
118        }
119
120
121        /**
122         * @return the cpPoint
123         */
124        public Integer getCPPoint() {
125                return cpPoint;
126        }
127
128        /**
129         * @param cpPoint the cpPoint to set
130         */
131        public void setCPPoint(Integer cpPoint) {
132                this.cpPoint = cpPoint;
133        }
134
135
136
137}