org.jmol.adapter.readers.quantum
Class SlaterReader

java.lang.Object
  extended by org.jmol.adapter.smarter.AtomSetCollectionReader
      extended by org.jmol.adapter.readers.quantum.BasisFunctionReader
          extended by org.jmol.adapter.readers.quantum.SlaterReader
Direct Known Subclasses:
AdfReader, DgridReader, MopacSlaterReader

abstract class SlaterReader
extends BasisFunctionReader

Author:
hansonr

Nested Class Summary
(package private)  class SlaterReader.OrbitalSorter
           
(package private)  class SlaterReader.SlaterSorter
           
 
Field Summary
private static double _1_4pi
           
private static double[] dfact2
           
private static double[] fact1
           
protected  SlaterData[] slaterArray
           
protected  List slaters
           
 
Fields inherited from class org.jmol.adapter.readers.quantum.BasisFunctionReader
alphaBeta, CANONICAL_DC_LIST, CANONICAL_DS_LIST, CANONICAL_FC_LIST, CANONICAL_FS_LIST, dfCoefMaps, ignoreMOs, moData, nOrbitals, orbitals, shells
 
Fields inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addVibrations, ANGSTROMS_PER_BOHR, applySymmetryToBonds, atomSetCollection, bsFilter, bsModels, calculationType, continuing, desiredModelNumber, desiredVibrationNumber, doApplySymmetry, doCheckUnitCell, doProcessLines, filter, getHeader, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, iHaveSymmetryOperators, iHaveUnitCell, isSequential, isTrajectory, latticeCells, line, matUnitCellOrientation, modelNumber, next, notionalUnitCell, os, prevline, ptLine, reader, readerName, readMolecularOrbitals, spaceGroup, symmetry, templateAtomCount, vibrationNumber, viewer
 
Constructor Summary
SlaterReader()
           
 
Method Summary
protected  void addSlater(int iAtom, int a, int b, int c, int d, double zeta, float coef)
          We build two data structures for each slater: int[] slaterInfo[] = {iatom, a, b, c, d} float[] slaterData[] = {zeta, coef} where psi = (coef)(x^a)(y^b)(z^c)(r^d)exp(-zeta*r) Mopac: a == -2 ==> z^2 ==> (coef)(2z^2-x^2-y^2)(r^d)exp(-zeta*r) and: b == -2 ==> (coef)(x^2-y^2)(r^d)exp(-zeta*r)
protected  void addSlater(SlaterData sd, int n)
           
private static double fact(double f, double zeta, int n)
          Sincere thanks to Miroslav Kohout (DGRID) for helping me get this right -- Bob Hanson, 1/5/2010 slater scaling based on zeta, n, l, and x y z exponents.
protected static double getSlaterConstCartesian(int n, double zeta, int el, int ex, int ey, int ez)
          scales slater using double factorials involving quantum number n, l, and xyz exponents.
protected static double getSlaterConstDSpherical(int n, double zeta, int ex, int ey)
          spherical scaling factors specifically for x2-y2 and z2 orbitals see http://openmopac.net/Manual/real_spherical_harmonics.html dz2 sqrt((1/2p)(5/8))(2cos2(q) -sin2(q)) sqrt(5/16p)(3z2-r2)/r2 dxz sqrt((1/2p)(15/4))(cos(q)sin(q))cos(f) sqrt(15/4p)(xz)/r2 dyz sqrt((1/2p)(15/4))(cos(q)sin(q))sin(f) sqrt(15/4p)(yz)/r2 dx2-y2 sqrt((1/2p)(15/16))sin2(q)cos2(f) sqrt(15/16p)(x2-y2)/r2 dxy sqrt((1/2p)(15/16))sin2(q)sin2(f) sqrt(15/4p)(xy)/r2 The fact() method returns sqrt(15/4p) for both z2 and x2-y2.
protected  double scaleSlater(int ex, int ey, int ez, int er, double zeta)
          Perform implementation-specific scaling.
protected  void setMOs(String units)
           
protected  void setSlaters(boolean doScale, boolean doSort)
          after the vectors intinfo and floatinfo are completed, we
protected  void sortOrbitalCoefficients(int[] pointers)
          sorts coefficients by atomic number for speed later
protected  void sortOrbitals()
          sorts orbitals by energy rather than by symmetry so that we can use "MO HOMO" "MO HOMO - 1" "MO LUMO"
 
Methods inherited from class org.jmol.adapter.readers.quantum.BasisFunctionReader
canonicalizeQuantumSubshellTag, filterMO, fixSlaterTypes, getDFMap, isQuantumBasisSupported, setMO
 
Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addJmolScript, addPrimitiveLatticeVector, addSites, addSiteScript, applySymmetryAndSetTrajectory, checkFilter, checkLastModel, checkLine, checkLineForScript, checkLineForScript, clearLatticeParameters, cloneLastAtomSet, discardLines, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains, discardLinesUntilNonBlank, discardLinesUntilStartsWith, doGetModel, doGetVibration, fillDataBlock, fillDataBlock, fillFloatArray, fillFrequencyData, filterAtom, finalizeReader, getElementSymbol, getFortranFormatLengths, getStrings, getSymmetry, getTokens, getTokens, getTokens, getTokensFloat, initializeReader, initializeSymmetry, isLastModel, newAtomSet, parseFloat, parseFloat, parseFloat, parseInt, parseInt, parseInt, parseInt, parseStringInfestedFloatArray, parseToken, parseToken, parseToken, parseTokenNext, parseTrimmed, parseTrimmed, readAtomSetCollectionFromDOM, readData, readLine, set2D, setAtomCoord, setAtomCoord, setFilter, setFractionalCoordinates, setMOData, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

slaters

protected final List slaters

slaterArray

protected SlaterData[] slaterArray

_1_4pi

private static final double _1_4pi
See Also:
Constant Field Values

fact1

private static final double[] fact1

dfact2

private static final double[] dfact2
Constructor Detail

SlaterReader

SlaterReader()
Method Detail

addSlater

protected final void addSlater(int iAtom,
                               int a,
                               int b,
                               int c,
                               int d,
                               double zeta,
                               float coef)
We build two data structures for each slater: int[] slaterInfo[] = {iatom, a, b, c, d} float[] slaterData[] = {zeta, coef} where psi = (coef)(x^a)(y^b)(z^c)(r^d)exp(-zeta*r) Mopac: a == -2 ==> z^2 ==> (coef)(2z^2-x^2-y^2)(r^d)exp(-zeta*r) and: b == -2 ==> (coef)(x^2-y^2)(r^d)exp(-zeta*r)

Parameters:
iAtom -
a -
b -
c -
d -
zeta -
coef -

addSlater

protected void addSlater(SlaterData sd,
                         int n)

setSlaters

protected final void setSlaters(boolean doScale,
                                boolean doSort)
after the vectors intinfo and floatinfo are completed, we

Parameters:
doScale -
doSort - TODO

setMOs

protected final void setMOs(String units)

sortOrbitalCoefficients

protected void sortOrbitalCoefficients(int[] pointers)
sorts coefficients by atomic number for speed later

Parameters:
pointers -

sortOrbitals

protected void sortOrbitals()
sorts orbitals by energy rather than by symmetry so that we can use "MO HOMO" "MO HOMO - 1" "MO LUMO"


scaleSlater

protected double scaleSlater(int ex,
                             int ey,
                             int ez,
                             int er,
                             double zeta)
Perform implementation-specific scaling. This method is subclassed in MopacReader to handle spherical slaters

Parameters:
ex -
ey -
ez -
er -
zeta -
Returns:
scaling factor

fact

private static double fact(double f,
                           double zeta,
                           int n)
Sincere thanks to Miroslav Kohout (DGRID) for helping me get this right -- Bob Hanson, 1/5/2010 slater scaling based on zeta, n, l, and x y z exponents. sqrt[(2zeta)^(2n + 1) * (2 el + 1)!! / (2 ex - 1)!! / (2 ey - 1)!! / (2 ez - 1)!! / 4pi / (2n)! ] The double factorials are precalculated.

Parameters:
f -
zeta -
n -
Returns:
scaled exponent

getSlaterConstCartesian

protected static final double getSlaterConstCartesian(int n,
                                                      double zeta,
                                                      int el,
                                                      int ex,
                                                      int ey,
                                                      int ez)
scales slater using double factorials involving quantum number n, l, and xyz exponents. fact2[x] is (2x - 1)!! Since x!! = 1 for x = 1, 0 or -1, we can just ignore this part for s and p orbitals, where x, y, and z are all 0 or 1. 7!! = 105 5!! = 15 3!! = 3 Numerators/4pi: all d orbitals: fact2[3] = (2*2 + 1)!! = 5!! = 15/4pi all f orbitals: fact2[4] = (2*3 + 1)!! = 7!! = 105/4pi Denominators: dxy, dyz, dxz all are 1 giving 15/4pi dx2, dy2, and dz2 all have one "2", giving 15/3!!/4pi or 5/4pi

Parameters:
n -
zeta -
el -
ex -
ey -
ez -
Returns:
scaled exponent

getSlaterConstDSpherical

protected static final double getSlaterConstDSpherical(int n,
                                                       double zeta,
                                                       int ex,
                                                       int ey)
spherical scaling factors specifically for x2-y2 and z2 orbitals see http://openmopac.net/Manual/real_spherical_harmonics.html dz2 sqrt((1/2p)(5/8))(2cos2(q) -sin2(q)) sqrt(5/16p)(3z2-r2)/r2 dxz sqrt((1/2p)(15/4))(cos(q)sin(q))cos(f) sqrt(15/4p)(xz)/r2 dyz sqrt((1/2p)(15/4))(cos(q)sin(q))sin(f) sqrt(15/4p)(yz)/r2 dx2-y2 sqrt((1/2p)(15/16))sin2(q)cos2(f) sqrt(15/16p)(x2-y2)/r2 dxy sqrt((1/2p)(15/16))sin2(q)sin2(f) sqrt(15/4p)(xy)/r2 The fact() method returns sqrt(15/4p) for both z2 and x2-y2. So now we ned to correct that with sqrt(1/12) for z2 and sqrt(1/4) for x2-y2. http://openmopac.net/Manual/real_spherical_harmonics.html Apply the appropriate scaling factor for spherical D orbitals. ex will be -2 for z2; ey will be -2 for x2-y2

Parameters:
n -
zeta -
ex -
ey -
Returns:
scaling factor