meshi.molecularElements.atoms
Class AtomList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<Atom>
              extended by meshi.molecularElements.atoms.AtomList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Atom>, java.util.Collection<Atom>, java.util.List<Atom>, java.util.RandomAccess
Direct Known Subclasses:
ImageAtomList

public class AtomList
extends java.util.ArrayList<Atom>

A list of Atoms

See Also:
Serialized Form

Nested Class Summary
static class AtomList.AcceptChainFilter
           
static class AtomList.BackboneFilter
           
static class AtomList.IsAtom
           
static class AtomList.IsDefrostedFilter
           
static class AtomList.IsFrozenFilter
           
static class AtomList.NonHydrogen
           
static class AtomList.RejectChainFilter
           
 
Field Summary
private  java.lang.String comment
           
private  MolecularSystem molecularSystem
           
private  MeshiLineReader sourceFile
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
AtomList()
           
AtomList(Atom atom)
           
AtomList(int initialCapaciy)
           
AtomList(MeshiLineReader file, Filter lineFilter)
          An atom list based on a PDB file In a multiple model file (such as NMR's) only model 1 is read.
AtomList(PdbReader file)
          An atom list based on a PDB file
AtomList(ResidueList residues)
          An atom list based on a residue list
AtomList(java.lang.String fileName)
           
AtomList(java.lang.String fileName, Filter lineFilter)
           
AtomList(java.lang.String dir, java.lang.String fileName)
           
 
Method Summary
 boolean add(Atom atom)
           
 void assertSingleResidue()
          Asserts that this AtomList is comprised of atoms belonging to a single residue.
 Atom atomAt(int i)
          Returns the atom in position i of the list.
 AtomList backbone()
           
 AtomList CAFilter()
           
 AtomList CAnoImageFilter()
           
 boolean checkSingleResidue()
          Checks if this AtomList is comprised of atoms belonging to a single residue.
 java.lang.String comment()
           
 void defrost()
           
 AtomList defrostedAtoms()
           
 AtomList filter(Filter filter)
          Extracts the list elements that pass the filter.
 void freeze()
           
 void freeze(Filter filter)
           
 AtomList frozenAtoms()
           
 boolean frozenAtomsExist()
           
 AtomList fullOccupancyFilter()
           
 AtomList getChainAtoms(java.lang.String chainLetter)
           
 double getRms(AtomList otherList)
           
 AtomList getSourceAtoms()
           
 boolean includesNowhereAtoms()
           
 MolecularSystem molecularSystem()
           
 void moveCMtoOrigin()
           
 AtomList noOXTFilter()
           
 void print()
           
 void print(MeshiWriter writer)
           
 double radius()
          of gyration of the list atoms.
 double radius2()
           
 Rms rms(AtomList otherList)
          RMS deviation between this list of atom and some other list.
 boolean sameAtoms(AtomList other)
          Returns true if the parameter has the same length and the same composition in terms of atom names.
 void setComment(java.lang.String s)
           
 void setMolecularSystem(MolecularSystem MolecularSystem)
           
 void setResidue(Residue residue)
          Sets the parameter to be the residue of this atom.
 AtomList somewhere()
           
 boolean sortable()
           
 MeshiLineReader sourceFile()
           
 AtomList[] splitToChains()
           
 Atom[] toArrayOfAtoms()
           
 java.lang.String toString()
           
 int whereIs(Atom atom)
           
 
Methods inherited from class java.util.ArrayList
add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

sourceFile

private MeshiLineReader sourceFile

molecularSystem

private MolecularSystem molecularSystem

comment

private java.lang.String comment
Constructor Detail

AtomList

public AtomList()

AtomList

public AtomList(Atom atom)

AtomList

public AtomList(int initialCapaciy)

AtomList

public AtomList(MeshiLineReader file,
                Filter lineFilter)
An atom list based on a PDB file In a multiple model file (such as NMR's) only model 1 is read. Currently whenever there are two alternative atom positions present, only position A is taken.


AtomList

public AtomList(PdbReader file)
An atom list based on a PDB file


AtomList

public AtomList(java.lang.String dir,
                java.lang.String fileName)

AtomList

public AtomList(java.lang.String fileName,
                Filter lineFilter)

AtomList

public AtomList(java.lang.String fileName)

AtomList

public AtomList(ResidueList residues)
An atom list based on a residue list

Method Detail

molecularSystem

public MolecularSystem molecularSystem()

setMolecularSystem

public void setMolecularSystem(MolecularSystem MolecularSystem)

filter

public AtomList filter(Filter filter)
Extracts the list elements that pass the filter.


add

public boolean add(Atom atom)
Specified by:
add in interface java.util.Collection<Atom>
Specified by:
add in interface java.util.List<Atom>
Overrides:
add in class java.util.ArrayList<Atom>

rms

public Rms rms(AtomList otherList)
RMS deviation between this list of atom and some other list.


getRms

public double getRms(AtomList otherList)

atomAt

public Atom atomAt(int i)
Returns the atom in position i of the list.


whereIs

public int whereIs(Atom atom)

radius

public double radius()
of gyration of the list atoms. SQRT{ SIGMA_OVER_ALL_ATOMS([(x-X)^2+(y-Y)^2+(z-Z)^2]/N)}
Where (x,y,z) are the atom coordinates and (X,Y,Z) are the coordinates of the center of mass.


radius2

public double radius2()

setResidue

public void setResidue(Residue residue)
Sets the parameter to be the residue of this atom.


toArrayOfAtoms

public Atom[] toArrayOfAtoms()

sourceFile

public MeshiLineReader sourceFile()

frozenAtomsExist

public boolean frozenAtomsExist()

freeze

public void freeze()

freeze

public void freeze(Filter filter)

defrost

public void defrost()

fullOccupancyFilter

public AtomList fullOccupancyFilter()

noOXTFilter

public AtomList noOXTFilter()

backbone

public AtomList backbone()

sortable

public boolean sortable()

toString

public java.lang.String toString()
Overrides:
toString in class java.util.AbstractCollection<Atom>

CAFilter

public AtomList CAFilter()

CAnoImageFilter

public AtomList CAnoImageFilter()

frozenAtoms

public AtomList frozenAtoms()

defrostedAtoms

public AtomList defrostedAtoms()

sameAtoms

public boolean sameAtoms(AtomList other)
Returns true if the parameter has the same length and the same composition in terms of atom names. Current implementation, rather inefficient.


assertSingleResidue

public void assertSingleResidue()
Asserts that this AtomList is comprised of atoms belonging to a single residue.

Throws:
MeshiException - if the assertion fails.

checkSingleResidue

public boolean checkSingleResidue()
Checks if this AtomList is comprised of atoms belonging to a single residue.


splitToChains

public AtomList[] splitToChains()

getChainAtoms

public AtomList getChainAtoms(java.lang.String chainLetter)

getSourceAtoms

public AtomList getSourceAtoms()

somewhere

public AtomList somewhere()

moveCMtoOrigin

public void moveCMtoOrigin()

includesNowhereAtoms

public boolean includesNowhereAtoms()

setComment

public void setComment(java.lang.String s)

print

public void print()

print

public void print(MeshiWriter writer)

comment

public java.lang.String comment()