Class CastepReader

  • All Implemented Interfaces:
    javajs.api.GenericLineReader

    public class CastepReader
    extends AtomSetCollectionReader
    CASTEP (http://www.castep.org) .cell file format relevant section of .cell file are included as comments below preliminary .castep, .phonon frequency reader -- hansonr@stolaf.edu 9/2011 -- Many thanks to Keith Refson for his assistance with this implementation -- atom's mass is encoded as bfactor -- FILTER options include "q=n" where n is an integer "q={1/4 1/4 0}" "q=ALL" -- for non-simple fractions, you must use the exact form of the wavevector description: -- load "xxx.phonon" FILTER "q=(-0.083333 0.083333 0.500000) -- for simple fractions, you can also just specify SUPERCELL {a b c} where the number of cells matches a given wavevector -- SUPERCELL {4 4 1}, for example note: following was never implemented? -- following this with ".1" ".2" etc. gives first, second, third, etc. occurance: -- load "xxx.phonon" FILTER "q=1.3" .... -- load "xxx.phonon" FILTER "{0 0 0}.3" ....
    Version:
    1.2
    Author:
    Joerg Meyer, FHI Berlin 2009 (meyer@fhi-berlin.mpg.de)
    • Field Detail

      • tokens

        private String[] tokens
      • isPhonon

        private boolean isPhonon
      • isTS

        private boolean isTS
      • isOutput

        private boolean isOutput
      • isCell

        private boolean isCell
      • a

        private float a
      • b

        private float b
      • c

        private float c
      • alpha

        private float alpha
      • beta

        private float beta
      • gamma

        private float gamma
      • abc

        private javajs.util.V3[] abc
      • ac

        private int ac
      • atomPts

        private javajs.util.P3[] atomPts
      • havePhonons

        private boolean havePhonons
      • lastQPt

        private String lastQPt
      • qpt2

        private int qpt2
      • desiredQpt

        private javajs.util.V3 desiredQpt
      • desiredQ

        private String desiredQ
      • chargeType

        private String chargeType
      • isAllQ

        private boolean isAllQ
      • haveCharges

        private boolean haveCharges
      • tsType

        private String tsType
      • lengthUnitIds

        private static final String[] lengthUnitIds
      • lengthUnitFactors

        private static final float[] lengthUnitFactors
      • matSupercell

        private javajs.util.M4 matSupercell
    • Constructor Detail

      • CastepReader

        public CastepReader()
    • Method Detail

      • setDesiredQpt

        private void setDesiredQpt​(String s)
      • readOutputUnitCell

        private void readOutputUnitCell()
                                 throws Exception
        Throws:
        Exception
      • readPhononTrajectories

        private void readPhononTrajectories()
                                     throws Exception
        Throws:
        Exception
      • setLatticeVectors

        private void setLatticeVectors()
      • readAtomData

        private void readAtomData​(float factor)
                           throws Exception
        Throws:
        Exception
      • tokenizeCastepCell

        private int tokenizeCastepCell()
                                throws Exception
        Throws:
        Exception
      • readOutputBornChargeTensors

        private void readOutputBornChargeTensors()
                                          throws Exception
        Throws:
        Exception
      • readOutputAtomIndex

        private int readOutputAtomIndex()
      • readOutputCharges

        private void readOutputCharges()
                                throws Exception
        read Mulliken or Hirshfield charges
        Throws:
        Exception
      • readPhononUnitCell

        private void readPhononUnitCell()
                                 throws Exception
        Throws:
        Exception
      • readPhononFractionalCoord

        private void readPhononFractionalCoord()
                                        throws Exception
        Throws:
        Exception
      • readPhononFrequencies

        private void readPhononFrequencies()
                                    throws Exception
        Throws:
        Exception
      • getFractionalCoord

        private String getFractionalCoord​(javajs.util.V3 qvec)
      • isInt

        private static boolean isInt​(float f)
      • setPhononVector

        private void setPhononVector​(float[] data,
                                     Atom atom,
                                     javajs.util.V3 rTrans,
                                     javajs.util.V3 qvec,
                                     javajs.util.V3 v)
        transform complex vibration vector to a real vector by applying the appropriate translation, storing the results in v
        Parameters:
        data - from .phonon line parsed for floats
        atom -
        rTrans - translation vector in unit fractional coord
        qvec - q point vector
        v - return vector