Class MergeFilter

java.lang.Object
ffx.potential.parsers.SystemFilter
ffx.potential.parsers.MergeFilter

public class MergeFilter extends SystemFilter
The MergeFilter class allows Force Field X to treat merging of Systems just like opening a file from a hard disk or socket.
Since:
1.0
Author:
Michael J. Schnieders
  • Constructor Details

  • Method Details

    • closeReader

      public void closeReader()
      Attempts to close any open resources associated with the underlying file; primarily to be used when finished reading a trajectory.
      Specified by:
      closeReader in class SystemFilter
    • readFile

      public boolean readFile()
      This method is different for each subclass and must be overridden.
      Specified by:
      readFile in class SystemFilter
      Returns:
      a boolean.
    • readNext

      public boolean readNext(boolean resetPosition)
      Reads the next model if applicable (currently, ARC files only).
      Specified by:
      readNext in class SystemFilter
      Parameters:
      resetPosition - Resets to first frame.
      Returns:
      If next model read.
    • readNext

      public boolean readNext(boolean resetPosition, boolean print)
      Reads the next model if applicable (currently, ARC files only).
      Specified by:
      readNext in class SystemFilter
      Parameters:
      resetPosition - Resets to first frame.
      print - Flag to print.
      Returns:
      If next model read.
    • readNext

      public boolean readNext(boolean resetPosition, boolean print, boolean parse)
      Reads the next model if applicable (currently, ARC files only).
      Specified by:
      readNext in class SystemFilter
      Parameters:
      resetPosition - Resets to first frame.
      print - Flag to print.
      parse - Parse data in file. May want to skip structures for parallel jobs.
      Returns:
      If next model read.
    • readNext

      public boolean readNext()
      Reads the next model if applicable (currently, ARC and PDB files only).
      Specified by:
      readNext in class SystemFilter
      Returns:
      If next model read.
    • writeFile

      public boolean writeFile(File saveFile, boolean append, String[] extraLines)
      This method is different for each subclass and must be overridden.

      If the append flag is true, "saveFile" will be appended to. Otherwise, the default versioning scheme will be applied.

      Specified by:
      writeFile in class SystemFilter
      Parameters:
      saveFile - a File object.
      append - a boolean.
      extraLines - Additional lines to append to a comments section, or null.
      Returns:
      a boolean.