Class SystemFilter

    • Field Detail

      • lambdaPattern

        protected static final Pattern lambdaPattern
      • dieOnMissingAtom

        protected final boolean dieOnMissingAtom
        Constant dieOnMissingAtom=
      • standardizeAtomNames

        protected final boolean standardizeAtomNames
        Standardize atom names to PDB standard by default.
      • vdwH

        protected final boolean vdwH
        True if atoms are to be printed to their van der Waals centers instead of nuclear centers (applies primarily to hydrogens).
      • atomList

        protected List<Atom> atomList
        The atomList is filled by filters that extend SystemFilter.
      • bondList

        protected List<Bond> bondList
        The bondList may be filled by the filters that extend SystemFilter.
      • systems

        protected List<MolecularAssembly> systems
        All MolecularAssembly instances defined. More than one MolecularAssembly should be defined for PDB entries with alternate locations.
      • files

        protected List<File> files
        Append multiple files into one MolecularAssembly.
      • properties

        protected org.apache.commons.configuration2.CompositeConfiguration properties
        Properties associated with this file.
      • forceField

        protected ForceField forceField
        The molecular mechanics force field being used.
      • fileRead

        protected boolean fileRead
        True after the file has been read successfully.
    • Constructor Detail

      • SystemFilter

        public SystemFilter​(List<File> files,
                            MolecularAssembly molecularAssembly,
                            ForceField forceField,
                            org.apache.commons.configuration2.CompositeConfiguration properties)
        Constructor for SystemFilter.
        Parameters:
        files - a List object.
        molecularAssembly - a MolecularAssembly object.
        forceField - a ForceField object.
        properties - a CompositeConfiguration object.
      • SystemFilter

        public SystemFilter​(File file,
                            MolecularAssembly molecularAssembly,
                            ForceField forceField,
                            org.apache.commons.configuration2.CompositeConfiguration properties)
        Constructor for SystemFilter.
        Parameters:
        file - a File object.
        molecularAssembly - a MolecularAssembly object.
        forceField - a ForceField object.
        properties - a CompositeConfiguration object.
      • SystemFilter

        public SystemFilter​(File file,
                            List<MolecularAssembly> molecularAssemblies,
                            ForceField forceField,
                            org.apache.commons.configuration2.CompositeConfiguration properties)
        Constructor for SystemFilter.
        Parameters:
        file - a File object.
        molecularAssemblies - a List object.
        forceField - a ForceField object.
        properties - a CompositeConfiguration object.
    • Method Detail

      • previousVersion

        public static File previousVersion​(File file)
        previousVersion
        Parameters:
        file - a File object.
        Returns:
        a File object.
      • version

        public static File version​(File file)
        Use setVersioning() to choose between prefix/postfix.
        Parameters:
        file - a File object.
        Returns:
        a File object.
      • applyAtomProperties

        public void applyAtomProperties()
        Automatically sets atom-specific flags, particularly nouse and inactive, and apply harmonic restraints. Intended to be called at the end of readFile() implementations.

        Supported syntax: "(\\d+)-(\\d+)"

      • closeReader

        public abstract void closeReader()
        Attempts to close any open resources associated with the underlying file; primarily to be used when finished reading a trajectory.
      • countNumModels

        public int countNumModels()
      • fileRead

        public boolean fileRead()
        Returns true if the read was successful
        Returns:
        a boolean.
      • getAtomList

        public List<Atom> getAtomList()
        Getter for the field atomList.
        Returns:
        a List object.
      • getBondCount

        public int getBondCount()
        getBondCount
        Returns:
        a int.
      • getCoordRestraints

        public List<CoordRestraint> getCoordRestraints()
        Gets the coordinate restraints parsed by this Filter.
        Returns:
        Coordinate restraints.
      • getFile

        public File getFile()
        getFile
        Returns:
        a File object.
      • setFile

        public void setFile​(File file)
        setFile
        Parameters:
        file - a File object.
      • getFiles

        public List<File> getFiles()
        Getter for the field files.
        Returns:
        a List object.
      • setFiles

        public void setFiles​(List<File> files)
        Setter for the field files.
        Parameters:
        files - a List object.
      • getLastReadLambda

        public OptionalDouble getLastReadLambda()
        Gets the last read lambda value read by the filter, if any.
        Returns:
        Last lambda value read by this filter.
      • getRemarkLines

        public String[] getRemarkLines()
        Gets all remark lines read by the last readFile or readNext call.
        Returns:
        Array of Strings representing remark lines, if any.
      • getSnapshot

        public int getSnapshot()
        Return snapshot number.
        Returns:
        The snapshot number.
      • readFile

        public abstract boolean readFile()
        This method is different for each subclass and must be overidden
        Returns:
        a boolean.
      • readNext

        public abstract boolean readNext()
        Reads the next model if applicable (currently, ARC and PDB files only).
        Returns:
        If next model read.
      • readNext

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

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

        public abstract boolean readNext​(boolean resetPosition,
                                         boolean print,
                                         boolean parse)
        Reads the next model if applicable (currently, ARC files only).
        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.
      • setForceField

        public void setForceField​(ForceField forceField)
        Setter for the field forceField.
        Parameters:
        forceField - a ForceField object.
      • setProperties

        public void setProperties​(org.apache.commons.configuration2.CompositeConfiguration properties)
        Setter for the field properties.
        Parameters:
        properties - a CompositeConfiguration object.
      • writeFile

        public boolean writeFile​(File saveFile,
                                 boolean append)
        This method is different for each subclass and must be overidden.

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

        Parameters:
        saveFile - a File object.
        append - a boolean.
        Returns:
        a boolean.
      • writeFile

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

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

        Parameters:
        saveFile - a File object.
        append - a boolean.
        extraLines - Additional lines to append to a comments section, or null.
        Returns:
        a boolean.
      • setFileRead

        protected void setFileRead​(boolean fileRead)
        Setter for the field fileRead.
        Parameters:
        fileRead - a boolean.