import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.Annotation;
+import jalview.datamodel.DBRefSource;
import jalview.datamodel.SequenceI;
import jalview.io.FileParse;
import jalview.io.StructureFile;
import jalview.schemes.ResidueProperties;
+import jalview.structure.StructureViewSettings;
import jalview.util.MessageManager;
import java.io.IOException;
{
Viewer viewer = null;
- public JmolParser(boolean addAlignmentAnnotations,
- boolean predictSecondaryStructure, boolean externalSecStr,
- String inFile, String type) throws IOException
+ public JmolParser(boolean addAlignmentAnnotations, boolean predictSecStr,
+ boolean externalSecStr, String inFile, String type)
+ throws IOException
{
super(inFile, type);
- this.visibleChainAnnotation = addAlignmentAnnotations;
- this.predictSecondaryStructure = predictSecondaryStructure;
- this.externalSecondaryStructure = externalSecStr;
- }
-
- public JmolParser(boolean addAlignmentAnnotations,
- boolean predictSecondaryStructure, boolean externalSecStr,
- FileParse fp) throws IOException
- {
- super(fp);
- this.visibleChainAnnotation = addAlignmentAnnotations;
- this.predictSecondaryStructure = predictSecondaryStructure;
- this.externalSecondaryStructure = externalSecStr;
}
- public JmolParser(FileParse fp) throws IOException
+ public JmolParser(boolean addAlignmentAnnotations, boolean predictSecStr,
+ boolean externalSecStr, FileParse fp) throws IOException
{
super(fp);
}
- public JmolParser(String inFile, String type) throws IOException
- {
- super(inFile, type);
- }
-
public JmolParser()
{
}
@Override
public void parse() throws IOException
{
-
+ String dataName = getDataName();
+ if (dataName.endsWith(".cif"))
+ {
+ setDbRefType(DBRefSource.MMCIF);
+ }
+ else
+ {
+ setDbRefType(DBRefSource.PDB);
+ }
setChains(new Vector<PDBChain>());
Viewer jmolModel = getJmolData();
jmolModel.openReader(getDataName(), getDataName(), getReader());
}
lastID = tmpatom.resNumIns.trim();
}
+ xferSettings();
+
makeResidueList();
makeCaBondList();
for (PDBChain chain : getChains())
{
SequenceI chainseq = postProcessChain(chain);
- createAnnotation(chainseq, chain, ms.at);
if (isRNA(chainseq))
{
rna.add(chainseq);
{
prot.add(chainseq);
}
+
+ if (StructureViewSettings.isPredictSecondaryStructure())
+ {
+ createAnnotation(chainseq, chain, ms.at);
+ }
}
} catch (OutOfMemoryError er)
{
curAtom.occupancy = ms.occupancies != null ? ms.occupancies[atom
.getIndex()] : Float.valueOf(atom.getOccupancy100());
curAtom.resNumIns = "" + curAtom.resNumber + curAtom.insCode;
- // curAtom.tfactor = atom.group.;
+ curAtom.tfactor = atom.getBfactor100() / 100f;
curAtom.type = 0;
significantAtoms.add(curAtom);
}
{
if (secstr[p] >= 'A' && secstr[p] <= 'z')
{
+ try
+ {
asecstr[p] = new Annotation(String.valueOf(secstr[p]), null,
secstrcode[p], Float.NaN);
ssFound = true;
+ } catch (Exception e)
+ {
+ // e.printStackTrace();
+ }
}
}
this.predictSecondaryStructure = predictSecondaryStructure;
}
+ public boolean isVisibleChainAnnotation()
+ {
+ return visibleChainAnnotation;
+ }
+
+ public void setVisibleChainAnnotation(boolean visibleChainAnnotation)
+ {
+ this.visibleChainAnnotation = visibleChainAnnotation;
+ }
+
}