edu.davidson.chm.waveFunction
Class Gaussian

java.lang.Object
  extended by edu.davidson.chm.waveFunction.WaveFunction
      extended by edu.davidson.chm.waveFunction.Gaussian

public class Gaussian
extends WaveFunction

Defines a Gaussian Basis Function

Copyright (c) 2001,2009 David N. Blauch

Version:
2.0
Author:
David N. Blauch

Constructor Summary
Gaussian()
           
Gaussian(int nbr, java.lang.String geometry)
          Creates a basis function that contains nbr gaussian functions
Gaussian(int nbr, java.lang.String geometry, double alpha, double scale, double coef)
          Creates a basis function that contains nbr gaussian functions and defines the first gaussian function.
 
Method Summary
protected  void createArrays()
           
 double getMaxR(double frac)
          Returns the maximum displacement from the nucleus at which the wave function has a value characterized by _fraction.
 double[] getValue(double r, double theta, double phi)
          Returns the value of the basis function at r, theta, phi.
 double[] getValueXYZ(double x, double y, double z)
          Returns the value of the basis function at r, theta, phi.
 void setFunction(int id, double alpha, double scale, double coef)
          Adds a gaussian function to the basis function.
protected  void setGeometry(java.lang.String geometry)
           
 void setOrigin(double r, double theta, double phi)
          Sets the position of the origin for the basis function.
 void setOriginXYZ(double x, double y, double z)
          Sets the position of the origin for the basis function.
 
Methods inherited from class edu.davidson.chm.waveFunction.WaveFunction
getID, setID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gaussian

public Gaussian()

Gaussian

public Gaussian(int nbr,
                java.lang.String geometry)
Creates a basis function that contains nbr gaussian functions


Gaussian

public Gaussian(int nbr,
                java.lang.String geometry,
                double alpha,
                double scale,
                double coef)
Creates a basis function that contains nbr gaussian functions and defines the first gaussian function.

Method Detail

getMaxR

public double getMaxR(double frac)
Description copied from class: WaveFunction
Returns the maximum displacement from the nucleus at which the wave function has a value characterized by _fraction. This method is used in ElectronDensity.class to determine the appropriate limits for the plot. The parameter _fraction might, for example, refer to a certain fraction of the maximum value of the wave function.

Specified by:
getMaxR in class WaveFunction

getValue

public double[] getValue(double r,
                         double theta,
                         double phi)
Returns the value of the basis function at r, theta, phi. This value is always real.

Specified by:
getValue in class WaveFunction

getValueXYZ

public double[] getValueXYZ(double x,
                            double y,
                            double z)
Returns the value of the basis function at r, theta, phi. This value is always real.

Specified by:
getValueXYZ in class WaveFunction
See Also:
WaveFunction.getValue(double, double, double)

setFunction

public void setFunction(int id,
                        double alpha,
                        double scale,
                        double coef)
Adds a gaussian function to the basis function. id ranges from 0 to n-1, where n is the number of gaussian functions in the basis. All basis functions must have the same geometry.


setOrigin

public void setOrigin(double r,
                      double theta,
                      double phi)
Sets the position of the origin for the basis function. The getValue is called with the spherical coordinates in the system. The basis function is evaluated with the coordinates for the atom.


setOriginXYZ

public void setOriginXYZ(double x,
                         double y,
                         double z)
Sets the position of the origin for the basis function. The getValue is called with the spherical coordinates in the system. The basis function is evaluated with the coordinates for the atom.


createArrays

protected void createArrays()

setGeometry

protected void setGeometry(java.lang.String geometry)