8a321cefcb9f67fda7b9213f4544c5b1b3637d92
[jalview.git] / src / jalview / structure / StructureImportSettings.java
1 package jalview.structure;
2
3 import jalview.datamodel.DBRefSource;
4
5 public class StructureImportSettings
6 {
7   /**
8    * set to true to add derived sequence annotations (temp factor read from
9    * file, or computed secondary structure) to the alignment
10    */
11   private static boolean visibleChainAnnotation = false;
12
13   /**
14    * Set true to predict secondary structure (using JMol for protein, Annotate3D
15    * for RNA)
16    */
17   private static boolean predictSecStr = false;
18
19   /**
20    * Set true (with predictSecondaryStructure=true) to predict secondary
21    * structure using an external service (currently Annotate3D for RNA only)
22    */
23   private static boolean externalSecondaryStructure = false;
24
25   private static boolean showSeqFeatures = true;
26
27   private static boolean processHETATMs = false;
28
29   private static String currentDefaultFormat = DBRefSource.PDB;
30   public enum StructureFormat
31   {
32     PDB, MMCIF
33   };
34
35   private static StructureFormat currentDefaultFormat = StructureFormat.PDB;
36
37   public static void addSettings(boolean addAlignmentAnnotations,
38           boolean predictSecStr, boolean externalSecStr)
39   {
40     StructureImportSettings.visibleChainAnnotation = addAlignmentAnnotations;
41     StructureImportSettings.predictSecStr = predictSecStr;
42     StructureImportSettings.externalSecondaryStructure = externalSecStr;
43     StructureImportSettings.showSeqFeatures = true;
44   }
45
46   public static boolean isVisibleChainAnnotation()
47   {
48     return visibleChainAnnotation;
49   }
50
51   public static void setVisibleChainAnnotation(
52           boolean visibleChainAnnotation)
53   {
54     StructureImportSettings.visibleChainAnnotation = visibleChainAnnotation;
55   }
56
57   public static boolean isPredictSecondaryStructure()
58   {
59     return predictSecStr;
60   }
61
62   public static void setPredictSecondaryStructure(
63           boolean predictSecondaryStructure)
64   {
65     StructureImportSettings.predictSecStr = predictSecondaryStructure;
66   }
67
68   public static boolean isExternalSecondaryStructure()
69   {
70     return externalSecondaryStructure;
71   }
72
73   public static void setExternalSecondaryStructure(
74           boolean externalSecondaryStructure)
75   {
76     StructureImportSettings.externalSecondaryStructure = externalSecondaryStructure;
77   }
78
79   public static boolean isShowSeqFeatures()
80   {
81     return showSeqFeatures;
82   }
83
84   public static void setShowSeqFeatures(boolean showSeqFeatures)
85   {
86     StructureImportSettings.showSeqFeatures = showSeqFeatures;
87   }
88
89   public static String getCurrentDefaultFormat()
90   {
91     return currentDefaultFormat.toString();
92   }
93
94   public static void setCurrentDefaultFormat(String currentDefaultFormat)
95   {
96     StructureImportSettings.currentDefaultFormat = StructureFormat
97             .valueOf(currentDefaultFormat);
98   }
99
100   public static boolean isProcessHETATMs()
101   {
102     return processHETATMs;
103   }
104
105   public static void setProcessHETATMs(boolean processHETATMs)
106   {
107     StructureImportSettings.processHETATMs = processHETATMs;
108   }
109
110 }