}
}
+ @Override
+ public boolean equals(Object that)
+ {
+ if (this == that || that == null)
+ {
+ return true;
+ }
+ if (that instanceof Atom)
+ {
+ Atom other = (Atom) that;
+ return other.resName.equals(this.resName)
+ && other.resNumber == this.resNumber
+ && other.resNumIns.equals(this.resNumIns)
+ && other.chain.equals(this.chain);
+ }
+ return false;
+ }
public Atom(float x, float y, float z)
{
this.x = x;
curAtom.resNumIns = "" + curAtom.resNumber + curAtom.insCode;
curAtom.tfactor = atom.getBfactor100() / 100f;
curAtom.type = 0;
- significantAtoms.add(curAtom);
+ // significantAtoms.add(curAtom);
+ // ignore atoms from subsequent models
+ if (!significantAtoms.contains(curAtom))
+ {
+ significantAtoms.add(curAtom);
+ }
prevAtom = atom;
}
}
org.jmol.modelset.Atom prevAtom,
HashMap<String, org.jmol.modelset.Atom> chainTerMap)
{
+ // System.out.println("Atom: " + curAtom.getAtomNumber()
+ // + " Last atom index " + curAtom.group.lastAtomIndex);
if (chainTerMap == null || prevAtom == null)
{
return true;
String defaultStructureFileFormat)
{
StructureImportSettings.defaultStructureFileFormat = PDBEntry.Type
- .valueOf(defaultStructureFileFormat);
+ .valueOf(defaultStructureFileFormat.toUpperCase());
}
public static String getDefaultPDBFileParser()
public static void setDefaultPDBFileParser(String defaultPDBFileParser)
{
StructureImportSettings.defaultPDBFileParser = StructureParser
- .valueOf(defaultPDBFileParser);
+ .valueOf(defaultPDBFileParser.toUpperCase());
}
}