Class EnergyException

All Implemented Interfaces:
Serializable

public class EnergyException extends ArithmeticException
This Exception class indicates an error in calculating energy or gradients. Expected behavior is that it will be caught by Potential.energy(), resulting in any necessary cleanup. Then, if the causeSevere flag is set true, ForceFieldEnergy will issue a logger.severe (resulting in exit). Otherwise, ForceFieldEnergy will simply rethrow the exception. The default is to rethrow the exception.
Since:
1.0
Author:
Jacob Litman, Michael J. Schnieders
See Also:
  • Constructor Details

    • EnergyException

      public EnergyException()
      Constructor for EnergyException.
    • EnergyException

      public EnergyException(String str)
      Constructor for EnergyException.
      Parameters:
      str - a String object.
    • EnergyException

      public EnergyException(String str, boolean causeSevere)
      Constructor for EnergyException.
      Parameters:
      str - a String object.
      causeSevere - a boolean.
    • EnergyException

      public EnergyException(String str, boolean causeSevere, double energy)
      Constructor for EnergyException.
      Parameters:
      str - a String object.
      causeSevere - a boolean.
  • Method Details

    • getEnergy

      public double getEnergy()
      Return the reported Energy.
      Returns:
      Energy.
    • doCauseSevere

      public boolean doCauseSevere()
      doCauseSevere.
      Returns:
      a boolean.