diff --git a/modules/mol/mm/src/forcefield.cc b/modules/mol/mm/src/forcefield.cc index 3a4b15aa4fb07ddcba4a12b5d5eb389559fb585e..c4896948fb568e1b54c94de08822b8acc89f0992 100644 --- a/modules/mol/mm/src/forcefield.cc +++ b/modules/mol/mm/src/forcefield.cc @@ -427,6 +427,12 @@ BlockModifierPtr Forcefield::GetBlockModifier(const String& modifier_name) const String Forcefield::GetAtomType(const String& res_name, const String& atom_name) const{ BuildingBlockPtr block = this->GetBuildingBlock(res_name); + if(!block){ + std::stringstream ss; + ss << "There is no building block for " << res_name; + ss << "in the forcefield!"; + throw ost::Error(ss.str()); + } return block->GetType(atom_name); }