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/**
030 * Contains the parameters that can be sent to CE
031 *
032 * @author Andreas Prlic
033 *
034 */
035public class OptimalCECPParameters extends CeParameters {
036        /**
037         * If true, ignores {@link #cpPoint} and tries all possible cp points.
038         */
039        protected Boolean tryAllCPs;
040        /**
041         * The CP point, specified as a residue index
042         *
043         * <p>TODO make this a ResidueNumber
044         */
045        protected Integer cpPoint;
046
047        @Override
048        public String toString() {
049                return "OptimalCECPParameters [scoringStrategy=" + scoringStrategy
050                + ", maxGapSize=" + maxGapSize
051                + ", rmsdThr=" + rmsdThr
052                + ", rmsdThrJoin="+ rmsdThrJoin
053                + ", winSize=" + winSize
054                + ", showAFPRanges=" + showAFPRanges
055                + ", maxOptRMSD=" + maxOptRMSD
056                + ", seqWeight=" + seqWeight
057                + ", tryAllCPs" + tryAllCPs
058                + ", cpPoint" + cpPoint
059                + "]";
060        }
061
062
063        @Override
064        public void reset(){
065                super.reset();
066                tryAllCPs = true;
067                cpPoint = 0;
068        }
069
070
071        @Override
072        public List<String> getUserConfigHelp() {
073                List<String> params = super.getUserConfigHelp();
074                params.add("Should we try all CP sites? Otherwise, only try the site specified by CPPoint.");
075                params.add("Index of the CP site. Ignored unless TryAllCPs=false");
076                return params;
077        }
078
079        @Override
080        public List<String> getUserConfigParameters() {
081                List<String> params = super.getUserConfigParameters();
082                params.add("TryAllCPs");
083                params.add("CPPoint");
084                return params;
085        }
086
087        @Override
088        public List<String> getUserConfigParameterNames(){
089                List<String> params = super.getUserConfigParameterNames();
090
091                params.add("Try all CPs");
092                params.add("CP Point");
093                return params;
094        }
095
096        @Override
097        @SuppressWarnings("rawtypes")
098        public List<Class> getUserConfigTypes() {
099                List<Class> params = super.getUserConfigTypes();
100                params.add(Boolean.class);
101                params.add(Integer.class);
102                return params;
103        }
104
105
106        /**
107         * @return Whether we should try all CP sites
108         */
109        public Boolean isTryAllCPs() {
110                return tryAllCPs;
111        }
112
113
114        /**
115         * @param tryAllCPs Set whether we should try all CP sites
116         */
117        public void setTryAllCPs(Boolean tryAllCPs) {
118                this.tryAllCPs = tryAllCPs;
119        }
120
121
122        /**
123         * @return the cpPoint
124         */
125        public Integer getCPPoint() {
126                return cpPoint;
127        }
128
129        /**
130         * @param cpPoint the cpPoint to set
131         */
132        public void setCPPoint(Integer cpPoint) {
133                this.cpPoint = cpPoint;
134        }
135
136
137
138}