Commit b1a6180a by maarten

merged oud en nieuw

git-svn-id: svn+ssh://gitlab/srv/svn-repos/pdb-redo/trunk@307 a1961a4f-ab94-4bcc-80e8-33b5a54de466
parent a789367e
// Lib for working with structures as contained in file and PDB files // Lib for working with structures as contained in file and PDB files
#include <thread>
#include <mutex>
#include "cif++/Structure.h" #include "cif++/Structure.h"
#include "cif++/AtomShape.h" #include "cif++/AtomShape.h"
#include "cif++/Point.h" #include "cif++/Point.h"
...@@ -157,6 +160,9 @@ list<DensityIntegration> DensityIntegration::sInstances; ...@@ -157,6 +160,9 @@ list<DensityIntegration> DensityIntegration::sInstances;
DensityIntegration& DensityIntegration::instance(float resolutionLow, float resolutionHigh) DensityIntegration& DensityIntegration::instance(float resolutionLow, float resolutionHigh)
{ {
static mutex m;
lock_guard<mutex> lock(m);
float a = 0.5f / resolutionLow, b = 0.5f / resolutionHigh; float a = 0.5f / resolutionLow, b = 0.5f / resolutionHigh;
auto i = find_if(sInstances.begin(), sInstances.end(), [=](const DensityIntegration& di) auto i = find_if(sInstances.begin(), sInstances.end(), [=](const DensityIntegration& di)
......
...@@ -259,10 +259,6 @@ struct AtomImpl ...@@ -259,10 +259,6 @@ struct AtomImpl
void moveTo(const Point& p) void moveTo(const Point& p)
{ {
// mRow["Cartn_x"] = p.getX();
// mRow["Cartn_y"] = p.getY();
// mRow["Cartn_z"] = p.getZ();
boost::format kPosFmt("%.3f"); boost::format kPosFmt("%.3f");
mRow["Cartn_x"] = (kPosFmt % p.getX()).str(); mRow["Cartn_x"] = (kPosFmt % p.getX()).str();
...@@ -280,6 +276,9 @@ struct AtomImpl ...@@ -280,6 +276,9 @@ struct AtomImpl
cif::tie(compId) = mRow.get("label_comp_id"); cif::tie(compId) = mRow.get("label_comp_id");
mCompound = Compound::create(compId); mCompound = Compound::create(compId);
if (VERBOSE and mCompound == nullptr)
cerr << "Compound not found: '" << compId << '\'' << endl;
} }
if (mCompound == nullptr) if (mCompound == nullptr)
...@@ -983,13 +982,6 @@ int Polymer::Distance(const Monomer& a, const Monomer& b) const ...@@ -983,13 +982,6 @@ int Polymer::Distance(const Monomer& a, const Monomer& b) const
return result; return result;
} }
//cif::RowSet Polymer::polySeqRows() const
//{
// auto& cat = mStructure->category("pdbx_poly_seq_scheme");
//
// return cat.find(cif::Key("asym_id") == mAsymID and cif::Key("entityID") == mEntityID);
//}
//
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// File // File
......
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