Class BARFilter

java.lang.Object
ffx.potential.parsers.BARFilter

public class BARFilter extends Object
The BARFilter class parses TINKER bar(*.BAR) files.
Since:
1.0
Author:
Rose A. Gogal
  • Constructor Summary

    Constructors
    Constructor
    Description
    BARFilter(File barFile)
    BARFilter constructor
    BARFilter(File xyzFile, double[] e1l1, double[] e1l2, double[] e2l1, double[] e2l2, double[] volume1, double[] volume2, double temperature1, double temperature2)
    BARFilter constructor
    BARFilter(File barFile, int startingSnap, int endingSnap)
    BARFilter constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    Return the potential energy for each snapshot of ensemble 1 at lambda 1.
    double[]
    Return the potential energy for each snapshot of ensemble 1 at lambda 2.
    double[]
    Return the potential energy for each snapshot of ensemble 2 at lambda 1.
    double[]
    Return the potential energy for each snapshot of ensemble 2 at lambda 2.
    Return the number of snapshots in the BAR file.
    int
    Return the number of snapshots in the BAR file.
    double
    Returns the temperature for ensemble 1.
    double
    Returns the temperature for ensemble 2.
    double[]
    Return the volume for each snapshot of ensemble 1.
    double[]
    Return the volume for each snapshot of ensemble 2.
    boolean
    Read TINKER bar files and parse the snapshots into energy arrays
    boolean
    writeFile(String saveFile, boolean isPBC)
    Write TINKER bar files
    boolean
    writeFile(String saveFile, boolean isPBC, boolean append)
    Write TINKER bar files

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BARFilter

      public BARFilter(File barFile)
      BARFilter constructor
      Parameters:
      barFile - a List object.
    • BARFilter

      public BARFilter(File barFile, int startingSnap, int endingSnap)
      BARFilter constructor
      Parameters:
      barFile - a List object.
      startingSnap - a List object.
      endingSnap - a List object.
    • BARFilter

      public BARFilter(File xyzFile, double[] e1l1, double[] e1l2, double[] e2l1, double[] e2l2, double[] volume1, double[] volume2, double temperature1, double temperature2)
      BARFilter constructor
      Parameters:
      xyzFile - a List object.
      e1l1 - energy in ensemble 1 at lambda 1
      e1l2 - energy in ensemble 1 at lambda 2
      e2l1 - energy in ensemble 2 at lambda 1
      e2l2 - energy in ensemble 2 at lambda 2
      volume1 - volume in ensemble 1
      volume2 - volume in ensemble 2
      temperature1 - temperature of ensemble 1
      temperature2 - temperature of ensemble 2
  • Method Details

    • readFile

      public boolean readFile()
      Read TINKER bar files and parse the snapshots into energy arrays
      Returns:
      True if the file was read successfully.
    • writeFile

      public boolean writeFile(String saveFile, boolean isPBC)
      Write TINKER bar files
      Parameters:
      saveFile - The file to write to.
      isPBC - include volume in the output file.
      Returns:
      True if successful.
    • writeFile

      public boolean writeFile(String saveFile, boolean isPBC, boolean append)
      Write TINKER bar files
      Parameters:
      saveFile - The file to write to.
      isPBC - include volume in the output file.
      append - If the append flag is true, "saveFile" will be appended to. Otherwise, the default versioning scheme will be applied.
      Returns:
      True if successful.
    • getTemperature1

      public double getTemperature1()
      Returns the temperature for ensemble 1.
      Returns:
      The temperature.
    • getTemperature2

      public double getTemperature2()
      Returns the temperature for ensemble 2.
      Returns:
      The temperature.
    • getE1l1

      public double[] getE1l1()
      Return the potential energy for each snapshot of ensemble 1 at lambda 1.
      Returns:
      The potential energy for each snapshot of ensemble 1 at lambda 1.
    • getE1l2

      public double[] getE1l2()
      Return the potential energy for each snapshot of ensemble 1 at lambda 2.
      Returns:
      The potential energy for each snapshot of ensemble 1 at lambda 2.
    • getE2l1

      public double[] getE2l1()
      Return the potential energy for each snapshot of ensemble 2 at lambda 1.
      Returns:
      The potential energy for each snapshot of ensemble 2 at lambda 1.
    • getE2l2

      public double[] getE2l2()
      Return the potential energy for each snapshot of ensemble 2 at lambda 2.
      Returns:
      The potential energy for each snapshot of ensemble 2 at lambda 2.
    • getVolume1

      public double[] getVolume1()
      Return the volume for each snapshot of ensemble 1.
      Returns:
      The volume for each snapshot of ensemble 1.
    • getVolume2

      public double[] getVolume2()
      Return the volume for each snapshot of ensemble 2.
      Returns:
      The volume for each snapshot of ensemble 2.
    • getNumberOfSnapshots

      public int getNumberOfSnapshots()
      Return the number of snapshots in the BAR file.
      Returns:
      The number of snapshots in the BAR file.
    • getFile

      public File getFile()
      Return the number of snapshots in the BAR file.
      Returns:
      The number of snapshots in the BAR file.