Class GridCell


  • public class GridCell
    extends java.lang.Object
    A grid cell to be used in contact calculation via spatial hashing algorithm.
    Author:
    Jose Duarte
    • Constructor Summary

      Constructors 
      Constructor Description
      GridCell​(Grid parent)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addIindex​(int serial)  
      void addJindex​(int serial)  
      java.util.List<Contact> getContactsToOtherCell​(GridCell otherCell)
      Calculates all distances of atoms between this cell and the given cell returning those that are within the given cutoff as a list of Contacts containing the indices of the pair and the calculated distance.
      java.util.List<Contact> getContactsWithinCell()
      Calculates all distances of atoms within this cell returning those that are within the given cutoff as a list of Contacts containing the indices of the pair and the calculated distance.
      int getNumIindices()  
      int getNumJindices()  
      boolean hasContactToAtom​(javax.vecmath.Point3d[] iAtoms, javax.vecmath.Point3d[] jAtoms, javax.vecmath.Point3d query, double cutoff)
      Tests whether any atom in this cell has a contact with the specified query atom
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GridCell

        public GridCell​(Grid parent)
    • Method Detail

      • addIindex

        public void addIindex​(int serial)
      • addJindex

        public void addJindex​(int serial)
      • getNumIindices

        public int getNumIindices()
      • getNumJindices

        public int getNumJindices()
      • getContactsWithinCell

        public java.util.List<Contact> getContactsWithinCell()
        Calculates all distances of atoms within this cell returning those that are within the given cutoff as a list of Contacts containing the indices of the pair and the calculated distance. If Grid.getJAtoms() is null, distances are within the iAtoms only
        Returns:
      • getContactsToOtherCell

        public java.util.List<Contact> getContactsToOtherCell​(GridCell otherCell)
        Calculates all distances of atoms between this cell and the given cell returning those that are within the given cutoff as a list of Contacts containing the indices of the pair and the calculated distance.
        Parameters:
        otherCell -
        iAtoms - the first set of atom coordinates to which the iIndices correspond
        jAtoms - the second set of atom coordinates to which the jIndices correspond, if null distances are within the iAtoms only
        cutoff -
        Returns:
      • hasContactToAtom

        public boolean hasContactToAtom​(javax.vecmath.Point3d[] iAtoms,
                                        javax.vecmath.Point3d[] jAtoms,
                                        javax.vecmath.Point3d query,
                                        double cutoff)
        Tests whether any atom in this cell has a contact with the specified query atom
        Parameters:
        iAtoms - the first set of atoms to which the iIndices correspond
        jAtoms - the second set of atoms to which the jIndices correspond, or null
        query - test point
        cutoff -
        Returns:
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object