1 /* $RCSfile$
2  * $Author$
3  * $Date$
4  * $Revision$
5  *
6  * Copyright (C) 2011  The Jmol Development Team
7  *
8  * Contact: jmol-developers@lists.sf.net
9  *
10  *  This library is free software; you can redistribute it and/or
11  *  modify it under the terms of the GNU Lesser General Public
12  *  License as published by the Free Software Foundation; either
13  *  version 2.1 of the License, or (at your option) any later version.
14  *
15  *  This library is distributed in the hope that it will be useful,
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  *  Lesser General Public License for more details.
19  *
20  *  You should have received a copy of the GNU Lesser General Public
21  *  License along with this library; if not, write to the Free Software
22  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23  *  02110-1301, USA.
24  */
25 
26 package org.jmol.c;
27 
28 public enum VDW {
29 
30   JMOL(0, "Jmol",null),  //OpenBabel-1.0
31   BABEL(1, "Babel",null),  //OpenBabel-2.2
32   RASMOL(2, "RasMol",null),  //OpenRasmol-2.7.2.1.1
33   BABEL21(3, "Babel21",null),  //OpenBabel-2.1
34 
35   AUTO_JMOL(0, null,"Jmol"),  //JMOL if undecided
36   AUTO_BABEL(1, null,"Babel"),  //BABEL if undecided
37   AUTO_RASMOL(2, null,"RasMol"),  //RASMOL if undecided
38   AUTO(0, "Auto",null),  //
39 
40   USER(-1, "User",null),  //
41 
42   ADPMAX(-1, null, "adpmax"),
43   ADPMIN(-1, null, "adpmin"),
44   HYDRO(-1, null, "hydrophobic"),
45   BONDING(-1, null, "bondingradius"),
46   TEMP(-1, null, "temperature"),
47 
48   NOJMOL(-1, null,null), //surface will be adding H atoms ??
49   NADA(-1, null, null);  // ABSOLUTE type -- ignore
50 
51   public int pt;
52   private String type;
53   private String type2;
54 
VDW(int pt, String type, String type2)55   private VDW(int pt, String type, String type2) {
56     this.pt = pt;
57     this.type = type;
58     this.type2 = type2;
59   }
getVdwLabel()60   public String getVdwLabel() {
61     return (type == null ? type2 : type);
62   }
63 
getVdwType(String label)64   public static VDW getVdwType(String label) {
65     if (label != null)
66       for (VDW item : values())
67         if (label.equalsIgnoreCase(item.type))
68           return item;
69     return null;
70   }
71 
getVdwType2(String label)72   public static VDW getVdwType2(String label) {
73     if (label != null)
74       for (VDW item : values())
75         if (label.equalsIgnoreCase(item.type2))
76           return item;
77     return null;
78   }
79 }
80