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 */
021package org.biojava.nbio.structure.align.ce;
022
023import org.biojava.nbio.structure.align.StructureAlignment;
024import org.biojava.nbio.structure.align.util.ConfigurationException;
025
026
027public class CeSideChainMain  extends CeMain implements StructureAlignment {
028
029        public static final String algorithmName = "jCE-sidechain";
030
031        /**
032         *  version history:
033         *  2.4 - Added more parameters to the command line, including -maxOptRMSD
034         *  2.3 - Initial version
035         */
036        private static final String version = "2.3";
037
038        public CeSideChainMain(){
039                super();
040
041                if ( params == null) {
042                        CeSideChainUserArgumentProcessor proc = new CeSideChainUserArgumentProcessor();
043                        params = (CeParameters) proc.getParameters();
044                }
045        }
046
047        public static void main(String[] args) throws ConfigurationException {
048                CeSideChainUserArgumentProcessor processor = new CeSideChainUserArgumentProcessor();
049                processor.process(args);
050        }
051
052        @Override
053        public String getAlgorithmName() {
054
055                return algorithmName;
056        }
057
058        @Override
059        public ConfigStrucAligParams getParameters() {
060
061                return params;
062        }
063
064        @Override
065        public void setParameters(ConfigStrucAligParams params){
066                System.out.println("setting params : " + params);
067                if (! (params instanceof CeParameters )){
068                        throw new IllegalArgumentException("provided parameter object is not of type CeParameter");
069                }
070                this.params = (CeParameters) params;
071        }
072
073        @Override
074        public String getVersion() {
075                return version;
076        }
077
078}