pub enum ForgeError {
ParameterParse(Error),
RuleParse(String),
AtomTyping(String),
ChargeCalculation(String),
MissingBioMetadata,
HybridChargeAssignment {
chain_id: String,
residue_id: i32,
residue_name: String,
detail: String,
},
MissingParameter {
atom_type: String,
detail: String,
},
InvalidBond {
i: usize,
j: usize,
detail: String,
},
EmptySystem,
Conversion(String),
}Expand description
Errors that can occur during DREIDING parameterization.
This enum covers all failure modes when running the forge
function, including configuration parsing, atom typing, charge calculation,
and parameter lookup failures.
Variants§
ParameterParse(Error)
Failed to parse force field parameters TOML.
RuleParse(String)
Failed to parse custom atom typing rules.
AtomTyping(String)
Atom typing assignment failed.
Occurs when the molecular graph cannot be typed due to unsupported elements, unusual bonding patterns, or rule matching failures.
ChargeCalculation(String)
Charge calculation failed.
Occurs when the QEq solver fails to converge or encounters invalid input data.
MissingBioMetadata
Hybrid charge method requires biological metadata.
Occurs when ChargeMethod::Hybrid is selected
but the input system has no BioMetadata.
HybridChargeAssignment
Hybrid charge assignment failed for a specific residue.
Fields
MissingParameter
Required force field parameter not found.
Occurs when an atom type is assigned but no corresponding parameters exist in the force field parameter file.
Fields
InvalidBond
Invalid bond definition in the input system.
Fields
EmptySystem
The input system contains no atoms.
Conversion(String)
Internal data conversion error.
Implementations§
Source§impl Error
impl Error
Sourcepub fn hybrid_charge_assignment(
chain_id: impl Into<String>,
residue_id: i32,
residue_name: &str,
details: impl Into<String>,
) -> Self
pub fn hybrid_charge_assignment( chain_id: impl Into<String>, residue_id: i32, residue_name: &str, details: impl Into<String>, ) -> Self
Creates a HybridChargeAssignment error.
§Arguments
chain_id— Chain identifierresidue_id— Residue sequence numberresidue_name— Residue namedetails— Description of the problem
§Returns
A HybridChargeAssignment error variant.
Sourcepub fn missing_parameter(atom_type: &str, details: impl Into<String>) -> Self
pub fn missing_parameter(atom_type: &str, details: impl Into<String>) -> Self
Creates a MissingParameter error.
§Arguments
atom_type— The atom type that is missing parametersdetails— Description of which parameter is missing
§Returns
A MissingParameter error variant.
Sourcepub fn invalid_bond(i: usize, j: usize, details: impl Into<String>) -> Self
pub fn invalid_bond(i: usize, j: usize, details: impl Into<String>) -> Self
Creates an InvalidBond error.
§Arguments
i— First atom indexj— Second atom indexdetails— Description of the bond problem
§Returns
An InvalidBond error variant.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<TyperError> for Error
impl From<TyperError> for Error
Source§fn from(e: TyperError) -> Self
fn from(e: TyperError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.