1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.gui; |
22 |
|
|
23 |
|
import java.util.List; |
24 |
|
|
25 |
|
import ext.edu.ucsf.rbvi.strucviz2.ChimeraModel; |
26 |
|
import ext.edu.ucsf.rbvi.strucviz2.StructureManager; |
27 |
|
import ext.edu.ucsf.rbvi.strucviz2.StructureManager.ModelType; |
28 |
|
import jalview.datamodel.PDBEntry; |
29 |
|
import jalview.datamodel.SequenceI; |
30 |
|
import jalview.ext.rbvi.chimera.ChimeraXCommands; |
31 |
|
import jalview.gui.StructureViewer.ViewerType; |
32 |
|
import jalview.io.DataSourceType; |
33 |
|
import jalview.structure.AtomSpec; |
34 |
|
import jalview.structure.StructureCommand; |
35 |
|
import jalview.structure.StructureSelectionManager; |
36 |
|
|
|
|
| 0% |
Uncovered Elements: 22 (22) |
Complexity: 9 |
Complexity Density: 0.69 |
|
37 |
|
public class JalviewChimeraXBindingModel extends JalviewChimeraBindingModel |
38 |
|
{ |
39 |
|
public static final String CHIMERAX_SESSION_EXTENSION = ".cxs"; |
40 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
41 |
0 |
public JalviewChimeraXBindingModel(ChimeraViewFrame chimeraViewFrame,... |
42 |
|
StructureSelectionManager ssm, PDBEntry[] pdbentry, |
43 |
|
SequenceI[][] sequenceIs, DataSourceType protocol) |
44 |
|
{ |
45 |
0 |
super(chimeraViewFrame, ssm, pdbentry, sequenceIs, protocol); |
46 |
0 |
setStructureCommands(new ChimeraXCommands()); |
47 |
|
} |
48 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
49 |
0 |
@Override... |
50 |
|
protected List<String> getChimeraPaths() |
51 |
|
{ |
52 |
0 |
return StructureManager.getChimeraPaths(true); |
53 |
|
} |
54 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
55 |
0 |
@Override... |
56 |
|
protected void addChimeraModel(PDBEntry pe, |
57 |
|
List<ChimeraModel> modelsToMap) |
58 |
|
{ |
59 |
|
|
60 |
|
|
61 |
|
|
62 |
0 |
int modelNumber = chimeraMaps.size() + 1; |
63 |
0 |
String command = "setattr #" + modelNumber + " models name " |
64 |
|
+ pe.getId(); |
65 |
0 |
executeCommand(new StructureCommand(command), false); |
66 |
0 |
modelsToMap.add(new ChimeraModel(pe.getId(), ModelType.PDB_MODEL, |
67 |
|
modelNumber, 0)); |
68 |
|
} |
69 |
|
|
70 |
|
|
71 |
|
@inheritDoc |
72 |
|
|
73 |
|
@return |
74 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
75 |
0 |
@Override... |
76 |
|
protected String getCommandFileExtension() |
77 |
|
{ |
78 |
0 |
return ".cxc"; |
79 |
|
} |
80 |
|
|
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
@return |
85 |
|
@see |
86 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
87 |
0 |
@Override... |
88 |
|
public String getSessionFileExtension() |
89 |
|
{ |
90 |
0 |
return CHIMERAX_SESSION_EXTENSION; |
91 |
|
} |
92 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
93 |
0 |
@Override... |
94 |
|
public String getHelpURL() |
95 |
|
{ |
96 |
0 |
return "http://www.rbvi.ucsf.edu/chimerax/docs/user/index.html"; |
97 |
|
} |
98 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
99 |
0 |
@Override... |
100 |
|
protected ViewerType getViewerType() |
101 |
|
{ |
102 |
0 |
return ViewerType.CHIMERAX; |
103 |
|
} |
104 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
105 |
0 |
@Override... |
106 |
|
protected String getModelId(int pdbfnum, String file) |
107 |
|
{ |
108 |
0 |
return String.valueOf(pdbfnum + 1); |
109 |
|
} |
110 |
|
|
111 |
|
|
112 |
|
|
113 |
|
|
114 |
|
|
115 |
|
@param |
116 |
|
@return |
117 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
118 |
0 |
@Override... |
119 |
|
protected AtomSpec parseAtomSpec(String atomSpec) |
120 |
|
{ |
121 |
0 |
return AtomSpec.fromChimeraXAtomspec(atomSpec); |
122 |
|
} |
123 |
|
|
124 |
|
} |