Package ffx.potential.utils
Class EnergyException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.ArithmeticException
ffx.potential.utils.EnergyException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorDescriptionConstructor for EnergyException.EnergyException
(String str) Constructor for EnergyException.EnergyException
(String str, boolean causeSevere) Constructor for EnergyException.EnergyException
(String str, boolean causeSevere, double energy) Constructor for EnergyException. -
Method Summary
Modifier and TypeMethodDescriptionboolean
doCauseSevere.double
Return the reported Energy.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
EnergyException
public EnergyException()Constructor for EnergyException. -
EnergyException
Constructor for EnergyException.- Parameters:
str
- aString
object.
-
EnergyException
Constructor for EnergyException.- Parameters:
str
- aString
object.causeSevere
- a boolean.
-
EnergyException
Constructor for EnergyException.- Parameters:
str
- aString
object.causeSevere
- a boolean.
-
-
Method Details
-
getEnergy
public double getEnergy()Return the reported Energy.- Returns:
- Energy.
-
doCauseSevere
public boolean doCauseSevere()doCauseSevere.- Returns:
- a boolean.
-