Class PWmatReader

  • All Implemented Interfaces:
    javajs.api.GenericLineReader

    public class PWmatReader
    extends AtomSetCollectionReader
    crude PWmat atom.config reader http://pwmatus.com/manual
    Author:
    hansonr
    • Field Detail

      • nAtoms

        private int nAtoms
      • haveLattice

        private boolean haveLattice
      • havePositions

        private boolean havePositions
      • haveMagnetic

        private boolean haveMagnetic
    • Constructor Detail

      • PWmatReader

        public PWmatReader()
    • Method Detail

      • checkLine

        protected boolean checkLine()
                             throws java.lang.Exception
        Overrides:
        checkLine in class AtomSetCollectionReader
        Returns:
        true if need to read new line
        Throws:
        java.lang.Exception
      • readUnitCell

        private void readUnitCell()
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • readCoordinates

        private void readCoordinates()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • readDataBlock

        private void readDataBlock​(java.lang.String name)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • readItems

        private void readItems​(java.lang.String name,
                               int offset,
                               float[] values)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setProperties

        private void setProperties​(java.lang.String name,
                                   float[] values,
                                   int iSet,
                                   int n)
      • readVectors

        private void readVectors​(java.lang.String name,
                                 int offset,
                                 boolean haveLine)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getLine

        private java.lang.String getLine()
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • removeComments

        private java.lang.String removeComments()
      • setVectors

        private void setVectors​(java.lang.String name,
                                float[] valuesX,
                                float[] valuesY,
                                float[] valuesZ,
                                int n)