Commit eda40b8e by maarten

fixed tortoize again

git-svn-id: svn+ssh://gitlab/srv/svn-repos/pdb-redo/trunk@512 a1961a4f-ab94-4bcc-80e8-33b5a54de466
parent c0c4be78
...@@ -1024,28 +1024,37 @@ float Monomer::chi(size_t nr) const ...@@ -1024,28 +1024,37 @@ float Monomer::chi(size_t nr) const
{ {
float result = 0; float result = 0;
auto i = kChiAtomsMap.find(mCompoundID); try
if (i != kChiAtomsMap.end() and nr < i->second.size())
{ {
vector<string> atoms{ "N", "CA", "CB" }; auto i = kChiAtomsMap.find(mCompoundID);
if (i != kChiAtomsMap.end() and nr < i->second.size())
{
vector<string> atoms{ "N", "CA", "CB" };
atoms.insert(atoms.end(), i->second.begin(), i->second.end()); atoms.insert(atoms.end(), i->second.begin(), i->second.end());
// in case we have a positive chiral volume we need to swap atoms // in case we have a positive chiral volume we need to swap atoms
if (chiralVolume() > 0) if (chiralVolume() > 0)
{ {
if (mCompoundID == "LEU") atoms.back() = "CD2"; if (mCompoundID == "LEU") atoms.back() = "CD2";
if (mCompoundID == "VAL") atoms.back() = "CG2"; if (mCompoundID == "VAL") atoms.back() = "CG2";
} }
result = DihedralAngle( result = DihedralAngle(
atomByID(atoms[nr + 0]).location(), atomByID(atoms[nr + 0]).location(),
atomByID(atoms[nr + 1]).location(), atomByID(atoms[nr + 1]).location(),
atomByID(atoms[nr + 2]).location(), atomByID(atoms[nr + 2]).location(),
atomByID(atoms[nr + 3]).location() atomByID(atoms[nr + 3]).location()
); );
}
} }
catch(const std::exception& e)
{
if (cif::VERBOSE)
std::cerr << e.what() << std::endl;
result = 0;
}
return result; return result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment