{
final ViewerData data = viewerData.getValue();
String chimeraSession = data.stateData;
+ List<String> pdbfilenames = new ArrayList<String>();
+ List<SequenceI[]> seqmaps = new ArrayList<SequenceI[]>();
+ List<String> pdbids = new ArrayList<String>();
+
if (new File(chimeraSession).exists())
{
+ Set<Entry<File, Object[]>> fileData = data.fileData.entrySet();
+ List<PDBEntry> pdbs = new ArrayList<PDBEntry>();
+ List<SequenceI[]> allseqs = new ArrayList<SequenceI[]>();
+ for (Entry<File, Object[]> pdb : fileData)
+ {
+ String filePath = (String) pdb.getValue()[0];
+ String pdbId = (String) pdb.getValue()[1];
+ final Vector seqList = (Vector) pdb.getValue()[2];
+ PDBEntry pdbentry = new PDBEntry();
+ pdbentry.setFile(filePath);
+ pdbentry.setId(pdbId);
+ pdbs.add(pdbentry);
+ SequenceI[] seqs = new SequenceI[seqList.size()];
+ seqList.copyInto(seqs);
+ allseqs.add(seqs);
+ }
+
// TODO can/should this be done via StructureViewer (like Jmol)?
- ChimeraViewFrame cvf = new ChimeraViewFrame(data, af);
+ final PDBEntry[] pdbArray = pdbs.toArray(new PDBEntry[pdbs
+ .size()]);
+ final SequenceI[][] seqsArray = allseqs.toArray(new SequenceI[allseqs.size()][]);
+ ChimeraViewFrame cvf = // new ChimeraViewFrame(data, af);
+ new ChimeraViewFrame(af.alignPanel, pdbArray, seqsArray);
}
else
{