conformation
Class HydrogenBonds

java.lang.Object
  extended byconformation.HydrogenBonds

public class HydrogenBonds
extends java.lang.Object

Author:
vincent

Nested Class Summary
 class HydrogenBonds.HBDefinitions
           
 class HydrogenBonds.HBFrameStats
           
 class HydrogenBonds.HBTrajectoryStats
           
 
Constructor Summary
HydrogenBonds()
           
 
Method Summary
static double[] checkHBond(int donor, int hydrogen, int acceptor, double[][] pos, double maxDistance, double minAngle)
          Is there a hydrogen bond involving the three atoms?
static int findDonor(int hydrogen, Bonds bondh)
           
static int[] findDonors(int[] hydrogens, Bonds bondh)
           
static HydrogenBonds.HBDefinitions getDefs(int size)
          Needed to avoid some uglyness regarding nested classes in the Jython/Java bridge and Mathematica's J/Link.
static HydrogenBonds.HBDefinitions getDefs(int[] hydrogens, int[] acceptors, Bonds bondh)
          Needed to avoid some uglyness regarding nested classes in the Jython/Java bridge and Mathematica's J/Link.
static HydrogenBonds.HBFrameStats getFrameStats(int size)
          Needed to avoid some uglyness regarding nested classes in the Jython/Java bridge.
static HydrogenBonds.HBTrajectoryStats getTrajStats(int size)
          Needed to avoid some uglyness regarding nested classes in the Jython/Java bridge.
static HydrogenBonds.HBFrameStats inspectFrame(HydrogenBonds.HBDefinitions def, double[][] pos, double maxDistance, double minAngle)
          Looks for hydrogen bonds in the supplied frame.
static int[][] removeIntraMolecularHBonds(int[] hydrogens, int[] acceptors, int[] molecules)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HydrogenBonds

public HydrogenBonds()
Method Detail

getDefs

public static HydrogenBonds.HBDefinitions getDefs(int[] hydrogens,
                                                  int[] acceptors,
                                                  Bonds bondh)
Needed to avoid some uglyness regarding nested classes in the Jython/Java bridge and Mathematica's J/Link.

Parameters:
hydrogens - the atom indices of the "hydrogens"
acceptors - the atom indices of the "acceptors"
bondh - the bonds involving hydrogens
Returns:
the definitions

getDefs

public static HydrogenBonds.HBDefinitions getDefs(int size)
Needed to avoid some uglyness regarding nested classes in the Jython/Java bridge and Mathematica's J/Link.

Parameters:
size - the number of (uninitialized) hydrogen bonds
Returns:
the definitions

getFrameStats

public static HydrogenBonds.HBFrameStats getFrameStats(int size)
Needed to avoid some uglyness regarding nested classes in the Jython/Java bridge.

Parameters:
size -
Returns:
new statistics object

getTrajStats

public static HydrogenBonds.HBTrajectoryStats getTrajStats(int size)
Needed to avoid some uglyness regarding nested classes in the Jython/Java bridge.

Parameters:
size - the number of hydrogen bonds
Returns:
stats object

findDonor

public static int findDonor(int hydrogen,
                            Bonds bondh)
Parameters:
hydrogen -
bondh - bonds involving hydrogens
Returns:
the atom that the hydrogen is bound to

findDonors

public static int[] findDonors(int[] hydrogens,
                               Bonds bondh)
Parameters:
hydrogens -
bondh -
Returns:
the atoms the hydrogens are bound to
See Also:
findDonor(int, Bonds)

removeIntraMolecularHBonds

public static int[][] removeIntraMolecularHBonds(int[] hydrogens,
                                                 int[] acceptors,
                                                 int[] molecules)

checkHBond

public static double[] checkHBond(int donor,
                                  int hydrogen,
                                  int acceptor,
                                  double[][] pos,
                                  double maxDistance,
                                  double minAngle)
Is there a hydrogen bond involving the three atoms?

Parameters:
donor -
hydrogen -
acceptor -
pos -
maxDistance -
minAngle -
Returns:
{bond lenght, bond angle} if it's a hydrogen bond, otherwise null.

inspectFrame

public static HydrogenBonds.HBFrameStats inspectFrame(HydrogenBonds.HBDefinitions def,
                                                      double[][] pos,
                                                      double maxDistance,
                                                      double minAngle)
Looks for hydrogen bonds in the supplied frame. Assumes gathered positions.

Parameters:
def -
pos -
maxDistance -
minAngle -
Returns:
statistics for this frame