IProgressIndicator progress)
{
return computeMapping(true, sequence, targetChains, pdbFile, protocol,
- progress, null, null);
+ progress, null, null, true);
}
/**
String pdbFile, DataSourceType sourceType, TFType tft,
String paeFilename)
{
+ return setMapping(forStructureView, sequenceArray, targetChainIds,
+ pdbFile, sourceType, tft, paeFilename, true);
+ }
+
+ synchronized public StructureFile setMapping(boolean forStructureView,
+ SequenceI[] sequenceArray, String[] targetChainIds,
+ String pdbFile, DataSourceType sourceType, TFType tft,
+ String paeFilename, boolean doXferSettings)
+ {
return computeMapping(forStructureView, sequenceArray, targetChainIds,
- pdbFile, sourceType, null, tft, paeFilename);
+ pdbFile, sourceType, null, tft, paeFilename, doXferSettings);
}
/**
synchronized public StructureFile computeMapping(boolean forStructureView,
SequenceI[] sequenceArray, String[] targetChainIds,
String pdbFile, DataSourceType sourceType,
- IProgressIndicator progress, TFType tft, String paeFilename)
+ IProgressIndicator progress, TFType tft, String paeFilename,
+ boolean doXferSettings)
{
long progressSessionId = System.currentTimeMillis() * 3;
// FIXME: possibly should just delete
boolean parseSecStr = processSecondaryStructure
- ? isStructureFileProcessed(pdbFile, sequenceArray)
- : false;
+ && !isStructureFileProcessed(pdbFile, sequenceArray);
StructureFile pdb = null;
boolean isMapUsingSIFTs = SiftsSettings.isMapWithSifts();
pdb.addSettings(parseSecStr && processSecondaryStructure,
parseSecStr && addTempFacAnnot,
parseSecStr && secStructServices);
+ // save doXferSettings and reset after doParse()
+ boolean temp = pdb.getDoXferSettings();
+ pdb.setDoXferSettings(doXferSettings);
pdb.doParse();
+ pdb.setDoXferSettings(temp);
if (pdb.getId() != null && pdb.getId().trim().length() > 0
&& DataSourceType.FILE == sourceType)
{
private boolean isStructureFileProcessed(String pdbFile,
SequenceI[] sequenceArray)
{
- boolean parseSecStr = true;
+ boolean processed = false;
if (isPDBFileRegistered(pdbFile))
{
for (SequenceI sq : sequenceArray)
// passed, not the structure data ID -
if (PDBfile.isCalcIdForFile(ala, findIdForPDBFile(pdbFile)))
{
- parseSecStr = false;
+ processed = true;
}
}
}
}
}
- return parseSecStr;
+ return processed;
}
public void addStructureMapping(StructureMapping sm)