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.xtal;
022
023public enum TransformType {
024
025        //              id fold  screw infinite  shortName
026        AU                              (0,   1, false, false,   "AU"),
027        XTALTRANSL              (1,   1, false, true,    "XT"),  // translation
028        CELLTRANSL              (2,   1, false, true,    "FT"),  // fractional translation
029
030        TWOFOLD                 (3,   2, false, false,   "2" ),
031        TWOFOLDSCREW    (4,   2, true , true,    "2S"),
032
033        THREEFOLD               (5,   3, false, false,   "3" ),
034        THREEFOLDSCREW  (6,   3, true,  true,    "3S"),
035
036        FOURFOLD                (7,   4, false, false,   "4" ),
037        FOURFOLDSCREW   (8,   4, true,  true,    "4S"),
038
039        SIXFOLD         (9,   6, false, false,   "6" ),
040        SIXFOLDSCREW    (10,  6, true,  true,    "6S"),
041
042        ONEBAR          (11, -1, false, false,   "-1"),
043
044        TWOBAR          (12, -2, false, false,   "-2"),
045        GLIDE           (13, -2, true,  false,   "GL"),
046
047        THREEBAR        (14, -3, false, false,   "-3"),
048
049        FOURBAR         (15, -4, false, false,   "-4"),
050
051        SIXBAR          (16, -6, false, false,   "-6");
052
053
054
055        private int id;
056        private int foldType;
057        private boolean isScrew;
058        private boolean isInfinite;
059        private String shortName;
060
061        private TransformType(int id, int foldType, boolean isScrew, boolean isInfinite, String shortName) {
062                this.id = id;
063                this.foldType = foldType;
064                this.isScrew = isScrew;
065                this.isInfinite = isInfinite;
066                this.shortName = shortName;
067        }
068
069        public int getId() {
070                return id;
071        }
072
073        public int getFoldType() {
074                return foldType;
075        }
076
077        /**
078         * Tells whether the transform type is a screw or glide plane
079         * @return
080         */
081        public boolean isScrew() {
082                return isScrew;
083        }
084
085        /**
086         * Tells whether the transform type produces infinite assemblies
087         * if interface happens between identical chains
088         * @return
089         */
090        public boolean isInfinite() {
091                return isInfinite;
092        }
093
094        public String getShortName() {
095                return shortName;
096        }
097}