Commit 438517f3 authored by Luka Vretenar's avatar Luka Vretenar Committed by Vedran Miletić

Conversion from std::cout to spdlog

parent db53311e
......@@ -254,12 +254,8 @@ public:
RbtTriposAtomType::eType GetTriposType() const { return m_triposType; }
void SetTriposType(RbtTriposAtomType::eType aType) { m_triposType = aType; }
// XB
// reweighting factor
// RbtDouble GetReweight() const {return m_dReweight;}
// void SetReweight(const RbtDouble dReweight) {m_dReweight = dReweight;}
// XB END MODIFICATIONS
double GetReweight() const {return m_dReweight;}
void SetReweight(const double dReweight) {m_dReweight = dReweight;}
///////////////////////////////////////////////
// Other public methods
///////////////////////////////////////////////
......@@ -337,7 +333,7 @@ private:
double m_dAtomicMass; // atomic mass
double m_dVdwRadius; // atomic mass
std::string m_strFFType; // force field atom type
// RbtDouble m_dReweight; // XB reweighting factor
double m_dReweight; // XB reweighting factor
RbtUIntCoordMap m_savedCoords; // DM 08 Feb 1999 - now store all saved coords
// in a map<RbtUInt,RbtCoord>
......
......@@ -19,6 +19,8 @@
#include "RbtContext.h"
#include "RbtFilterExpression.h"
#include <sstream>
class FilterVbleExp;
class FilterAddExp;
class FilterSubExp;
......@@ -56,6 +58,7 @@ protected:
class PrintVisitor : public RbtFilterExpressionVisitor {
public:
PrintVisitor(RbtContextPtr);
~PrintVisitor();
virtual void VisitVbleExp(FilterVbleExp *);
virtual void VisitAddExp(FilterAddExp *);
virtual void VisitSubExp(FilterSubExp *);
......@@ -68,11 +71,13 @@ public:
private:
RbtContextPtr contextp;
std::ostringstream strbuf;
};
class PrettyPrintVisitor : public RbtFilterExpressionVisitor {
public:
PrettyPrintVisitor(RbtContextPtr);
~PrettyPrintVisitor();
virtual void VisitVbleExp(FilterVbleExp *);
virtual void VisitAddExp(FilterAddExp *);
virtual void VisitSubExp(FilterSubExp *);
......@@ -85,6 +90,7 @@ public:
private:
RbtContextPtr contextp;
std::ostringstream strbuf;
};
class EvaluateVisitor : public RbtFilterExpressionVisitor {
......
......@@ -52,8 +52,6 @@ public:
RbtPRMFactory(RbtParameterFileSource *pParamSource);
RbtPRMFactory(RbtParameterFileSource *pParamSource, RbtDockingSite *pDS);
int GetTrace() const { return m_iTrace; }
void SetTrace(int iTrace) { m_iTrace = iTrace; }
RbtDockingSite *GetDockingSite() const { return m_pDS; }
void SetDockingSite(RbtDockingSite *pDS) { m_pDS = pDS; }
......@@ -69,6 +67,5 @@ private:
void AttachSolventFlexData(RbtModel *pSolvent);
RbtParameterFileSource *m_pParamSource;
RbtDockingSite *m_pDS;
int m_iTrace;
};
#endif /*RBTPRMFACTORY_H_*/
......@@ -44,8 +44,7 @@ protected:
virtual double RawScore() const;
private:
void SetupAtomList(RbtAtomList &atomList, const RbtAtomList &neighbourList,
int traceTriggerLevel);
void SetupAtomList(RbtAtomList &atomList, const RbtAtomList &neighbourList);
};
#endif //_RBTSETUPPOLARSF_H_
......@@ -14,18 +14,19 @@
#include <cerrno>
#include <climits>
#include <cmath>
#include <spdlog/spdlog.h>
void PrintVisitor::VisitVbleExp(FilterVbleExp *fe) {
std::string name = fe->GetVble().GetName();
if (name[0] == 'c') // constant
std::cout << fe->GetVble().GetValue() << " ";
strbuf << fe->GetVble().GetValue() << " ";
else
std::cout << fe->GetVble().GetName() << " ";
strbuf << fe->GetVble().GetName() << " ";
}
void PrettyPrintVisitor::VisitVbleExp(FilterVbleExp *fe) {
// std::cout << "Vble ";
std::cout << fe->GetVble().GetName() << " ";
// strbuf << "Vble ";
strbuf << fe->GetVble().GetName() << " ";
}
void EvaluateVisitor::VisitVbleExp(FilterVbleExp *fe) {
......@@ -33,83 +34,83 @@ void EvaluateVisitor::VisitVbleExp(FilterVbleExp *fe) {
}
void PrintVisitor::VisitAddExp(FilterAddExp *fe) {
std::cout << "+ ";
strbuf << "+ ";
for (int i = 0; i < fe->GetNOps(); i++)
fe->GetOp(i)->Accept(*this);
}
void PrettyPrintVisitor::VisitAddExp(FilterAddExp *fe) {
std::cout << "(";
strbuf << "(";
fe->GetOp(0)->Accept(*this);
std::cout << "+ ";
strbuf << "+ ";
fe->GetOp(1)->Accept(*this);
std::cout << ")";
strbuf << ")";
}
void EvaluateVisitor::VisitAddExp(FilterAddExp *fe) {
fe->GetOp(0)->Accept(*this);
fe->GetOp(1)->Accept(*this);
fe->SetValue(fe->GetOp(0)->GetValue() + fe->GetOp(1)->GetValue());
// std::cout << "AddExp: " << fe->GetOp(0)->GetValue() << "\t" <<
// strbuf << "AddExp: " << fe->GetOp(0)->GetValue() << "\t" <<
// fe->GetOp(1)->GetValue() << std::endl;
}
void PrintVisitor::VisitSubExp(FilterSubExp *fe) {
std::cout << "- ";
strbuf << "- ";
for (int i = 0; i < fe->GetNOps(); i++)
fe->GetOp(i)->Accept(*this);
}
void PrettyPrintVisitor::VisitSubExp(FilterSubExp *fe) {
std::cout << "(";
strbuf << "(";
fe->GetOp(0)->Accept(*this);
std::cout << "- ";
strbuf << "- ";
fe->GetOp(1)->Accept(*this);
std::cout << ")";
strbuf << ")";
}
void EvaluateVisitor::VisitSubExp(FilterSubExp *fe) {
fe->GetOp(0)->Accept(*this);
fe->GetOp(1)->Accept(*this);
fe->SetValue(fe->GetOp(0)->GetValue() - fe->GetOp(1)->GetValue());
// std::cout << "sub " << fe->GetOp(0)->GetValue() <<"\t" <<
// strbuf << "sub " << fe->GetOp(0)->GetValue() <<"\t" <<
// fe->GetOp(1)->GetValue() << std::endl;
}
void PrintVisitor::VisitMulExp(FilterMulExp *fe) {
std::cout << "* ";
strbuf << "* ";
for (int i = 0; i < fe->GetNOps(); i++)
fe->GetOp(i)->Accept(*this);
}
void PrettyPrintVisitor::VisitMulExp(FilterMulExp *fe) {
std::cout << "(";
strbuf << "(";
fe->GetOp(0)->Accept(*this);
std::cout << "* ";
strbuf << "* ";
fe->GetOp(1)->Accept(*this);
std::cout << ")";
strbuf << ")";
}
void EvaluateVisitor::VisitMulExp(FilterMulExp *fe) {
fe->GetOp(0)->Accept(*this);
fe->GetOp(1)->Accept(*this);
fe->SetValue(fe->GetOp(0)->GetValue() * fe->GetOp(1)->GetValue());
// std::cout << "Mul " << fe->GetOp(0)->GetValue() <<"\t" <<
// strbuf << "Mul " << fe->GetOp(0)->GetValue() <<"\t" <<
// fe->GetOp(1)->GetValue() << std::endl;
}
void PrintVisitor::VisitDivExp(FilterDivExp *fe) {
std::cout << "/ ";
strbuf << "/ ";
for (int i = 0; i < fe->GetNOps(); i++)
fe->GetOp(i)->Accept(*this);
}
void PrettyPrintVisitor::VisitDivExp(FilterDivExp *fe) {
std::cout << "(";
strbuf << "(";
fe->GetOp(0)->Accept(*this);
std::cout << "div ";
strbuf << "div ";
fe->GetOp(1)->Accept(*this);
std::cout << ")";
strbuf << ")";
}
void EvaluateVisitor::VisitDivExp(FilterDivExp *fe) {
......@@ -117,7 +118,7 @@ void EvaluateVisitor::VisitDivExp(FilterDivExp *fe) {
fe->GetOp(0)->Accept(*this);
RbtReturnType v0 = fe->GetOp(0)->GetValue();
RbtReturnType v1 = fe->GetOp(1)->GetValue();
// std::cout << "div " << v0 <<"\t" << v1 << std::endl;
// strbuf << "div " << v0 <<"\t" << v1 << std::endl;
if (std::fabs(v1) < 0.000001)
fe->SetValue(v0);
else
......@@ -125,17 +126,17 @@ void EvaluateVisitor::VisitDivExp(FilterDivExp *fe) {
}
void PrintVisitor::VisitAndExp(FilterAndExp *fe) {
std::cout << "and ";
strbuf << "and ";
for (int i = 0; i < fe->GetNOps(); i++)
fe->GetOp(i)->Accept(*this);
}
void PrettyPrintVisitor::VisitAndExp(FilterAndExp *fe) {
std::cout << "( (";
strbuf << "( (";
fe->GetOp(0)->Accept(*this);
std::cout << " > 0) and (";
strbuf << " > 0) and (";
fe->GetOp(1)->Accept(*this);
std::cout << " > 0) )";
strbuf << " > 0) )";
}
void EvaluateVisitor::VisitAndExp(FilterAndExp *fe) {
......@@ -154,15 +155,15 @@ void EvaluateVisitor::VisitAndExp(FilterAndExp *fe) {
}
void PrintVisitor::VisitLogExp(FilterLogExp *fe) {
std::cout << "log ";
strbuf << "log ";
for (int i = 0; i < fe->GetNOps(); i++)
fe->GetOp(i)->Accept(*this);
}
void PrettyPrintVisitor::VisitLogExp(FilterLogExp *fe) {
std::cout << "(log ";
strbuf << "(log ";
fe->GetOp(0)->Accept(*this);
std::cout << ")";
strbuf << ")";
}
void EvaluateVisitor::VisitLogExp(FilterLogExp *fe) {
......@@ -172,19 +173,19 @@ void EvaluateVisitor::VisitLogExp(FilterLogExp *fe) {
fe->SetValue(0.0);
else
fe->SetValue(std::log(std::fabs(v0)));
// std::cout << "log " << v0 << std::endl;
// strbuf << "log " << v0 << std::endl;
}
void PrintVisitor::VisitExpExp(FilterExpExp *fe) {
std::cout << "exp ";
strbuf << "exp ";
for (int i = 0; i < fe->GetNOps(); i++)
fe->GetOp(i)->Accept(*this);
}
void PrettyPrintVisitor::VisitExpExp(FilterExpExp *fe) {
std::cout << "(exp ";
strbuf << "(exp ";
fe->GetOp(0)->Accept(*this);
std::cout << ")";
strbuf << ")";
}
void EvaluateVisitor::VisitExpExp(FilterExpExp *fe) {
......@@ -195,29 +196,29 @@ void EvaluateVisitor::VisitExpExp(FilterExpExp *fe) {
{
// float m = FLOAT_MAX; //numeric_limits<float>::max();
// std::cout << "greater " << m << "\n";
// strbuf << "greater " << m << "\n";
fe->SetValue(std::exp(20));
} else if (v0 < -200)
fe->SetValue(0.0);
else
fe->SetValue(std::exp(v0));
// std::cout << "exp " << v0 << "\t" << fe->GetValue() <<endl;
// strbuf << "exp " << v0 << "\t" << fe->GetValue() <<endl;
}
void PrintVisitor::VisitIfExp(FilterIfExp *fe) {
std::cout << "if ";
strbuf << "if ";
for (int i = 0; i < fe->GetNOps(); i++)
fe->GetOp(i)->Accept(*this);
}
void PrettyPrintVisitor::VisitIfExp(FilterIfExp *fe) {
std::cout << "\nif ";
strbuf << "\nif ";
fe->GetOp(0)->Accept(*this);
std::cout << " > 0 then\n\t";
strbuf << " > 0 then\n\t";
fe->GetOp(1)->Accept(*this);
std::cout << "\nelse\n\t";
strbuf << "\nelse\n\t";
fe->GetOp(2)->Accept(*this);
std::cout << "\nend\n";
strbuf << "\nend\n";
}
void EvaluateVisitor::VisitIfExp(FilterIfExp *fe) {
......@@ -238,6 +239,14 @@ RbtFilterExpressionVisitor::RbtFilterExpressionVisitor() {}
PrintVisitor::PrintVisitor(RbtContextPtr co) : contextp(co) {}
PrintVisitor::~PrintVisitor() {
spdlog::info(strbuf.str());
}
PrettyPrintVisitor::PrettyPrintVisitor(RbtContextPtr co) : contextp(co) {}
PrettyPrintVisitor::~PrettyPrintVisitor() {
spdlog::info(strbuf.str());
}
EvaluateVisitor::EvaluateVisitor(RbtContextPtr co) : contextp(co) {}
This diff is collapsed.
......@@ -13,6 +13,7 @@
#include "RbtPolarIdxSF.h"
#include "RbtPlane.h"
#include "RbtWorkSpace.h"
#include <spdlog/spdlog.h>
// Static data members
std::string RbtPolarIdxSF::_CT("RbtPolarIdxSF");
......@@ -32,9 +33,7 @@ RbtPolarIdxSF::RbtPolarIdxSF(const std::string &strName)
AddParameter(_ATTR, m_bAttr);
AddParameter(_THRESHOLD_POS, m_posThreshold);
AddParameter(_THRESHOLD_NEG, m_negThreshold);
#ifdef _DEBUG
std::cout << _CT << " parameterised constructor" << std::endl;
#endif //_DEBUG
spdlog::trace("RbtPolarIdxSF parameterised constructor");
_RBTOBJECTCOUNTER_CONSTR_(_CT);
}
......@@ -42,9 +41,7 @@ RbtPolarIdxSF::~RbtPolarIdxSF() {
ClearReceptor();
ClearLigand();
ClearSolvent();
#ifdef _DEBUG
std::cout << _CT << " destructor" << std::endl;
#endif //_DEBUG
spdlog::trace("RbtPolarIdxSF destructor");
_RBTOBJECTCOUNTER_DESTR_(_CT);
}
......@@ -103,7 +100,6 @@ void RbtPolarIdxSF::SetupReceptor() {
double flexDist =
2.0; // Additional indexing increment for flexibile OH and NH3
RbtDockingSitePtr spDS = GetWorkSpace()->GetDockingSite();
int iTrace = GetTrace();
int nCoords = GetReceptor()->GetNumSavedCoords() - 1;
if (nCoords > 0) {
......@@ -113,9 +109,7 @@ void RbtPolarIdxSF::SetupReceptor() {
m_spNegGrid = CreateInteractionGrid();
m_recepNegList = CreateAcceptorInteractionCenters(atomList);
for (int i = 1; i <= nCoords; i++) {
if (iTrace > 0) {
std::cout << _CT << ": Indexing receptor coords # " << i << std::endl;
}
spdlog::info("RbtPolarIdxSF: Indexing receptor coords # {}", i);
GetReceptor()->RevertCoords(i);
for (RbtInteractionCenterListConstIter iter = m_recepPosList.begin();
iter != m_recepPosList.end(); iter++) {
......@@ -201,11 +195,7 @@ void RbtPolarIdxSF::SetupReceptor() {
double rvdw = (*iter)->GetAtom1Ptr()->GetVdwRadius();
m_spNegGrid->SetInteractionLists(*iter, rvdw + idxIncr + flexDist);
}
if (iTrace > 0) {
double score = ReceptorScore();
std::cout << GetWorkSpace()->GetName() << " " << GetFullName()
<< ": Intra-receptor score = " << score << std::endl;
}
spdlog::info("{} {}: Intra-receptor score = {}", GetWorkSpace()->GetName(), GetFullName(), ReceptorScore());
}
// Index the rigid interaction centers as usual
......
......@@ -12,6 +12,7 @@
#include "RbtPolarIntraSF.h"
#include "RbtSFRequest.h"
#include <spdlog/spdlog.h>
// Static data members
std::string RbtPolarIntraSF::_CT("RbtPolarIntraSF");
......@@ -23,17 +24,13 @@ RbtPolarIntraSF::RbtPolarIntraSF(const std::string &strName)
: RbtBaseSF(_CT, strName), m_bAttr(true) {
// Add parameters
AddParameter(_ATTR, m_bAttr);
#ifdef _DEBUG
std::cout << _CT << " parameterised constructor" << std::endl;
#endif //_DEBUG
spdlog::trace("RbtPolarIntraSF parameterised constructor");
_RBTOBJECTCOUNTER_CONSTR_(_CT);
}
RbtPolarIntraSF::~RbtPolarIntraSF() {
ClearModel();
#ifdef _DEBUG
std::cout << _CT << " destructor" << std::endl;
#endif //_DEBUG
spdlog::trace("RbtPolarIntraSF destructor");
_RBTOBJECTCOUNTER_DESTR_(_CT);
}
......@@ -107,7 +104,6 @@ void RbtPolarIntraSF::ParameterUpdated(const std::string &strName) {
// Handles the Partition request
void RbtPolarIntraSF::HandleRequest(RbtRequestPtr spRequest) {
RbtVariantList params = spRequest->GetParameters();
int iTrace = GetTrace();
switch (spRequest->GetID()) {
// ID_REQ_SF_PARTITION requests come in two forms:
......@@ -116,26 +112,17 @@ void RbtPolarIntraSF::HandleRequest(RbtRequestPtr spRequest) {
// param[1] = distance => Partition a named scoring function
case ID_REQ_SF_PARTITION:
if (params.size() == 1) {
if (iTrace > 2) {
std::cout << _CT << "::HandleRequest: Partitioning " << GetFullName()
<< " at distance=" << params[0] << std::endl;
}
spdlog::debug("RbtPolarIntraSF::HandleRequest: Partitioning {} at distance={}", GetFullName(), params[0]);
Partition(m_posList, m_negList, m_intns, m_prtIntns, params[0]);
} else if ((params.size() == 2) && (params[0].String() == GetFullName())) {
if (iTrace > 2) {
std::cout << _CT << "::HandleRequest: Partitioning " << GetFullName()
<< " at distance=" << params[1] << std::endl;
}
Partition(m_posList, m_negList, m_intns, m_prtIntns, params[1]);
spdlog::debug("RbtPolarIntraSF::HandleRequest: Partitioning {} at distance={}", GetFullName(), params[1]);
Partition(m_posList, m_negList, m_intns, m_prtIntns, params[1]);
}
break;
// Pass all other requests to base handler
default:
if (iTrace > 2) {
std::cout << _CT << "::HandleRequest: " << GetFullName()
<< " passing request to base handler" << std::endl;
}
spdlog::debug("RbtPolarIntraSF::HandleRequest: {} passing request to base handler", GetFullName());
RbtBaseObject::HandleRequest(spRequest);
break;
}
......
This diff is collapsed.
......@@ -20,6 +20,7 @@
#include <Eigen/Dense>
#include <Eigen/Eigenvalues>
#include <spdlog/spdlog.h>
// Special case for water
// Allow for symmetry
......@@ -47,13 +48,12 @@ RbtPrincipalAxes Rbt::GetSolventPrincipalAxes(const RbtAtomPtr &oAtom,
retVal.axis2 = -retVal.axis2;
retVal.axis3 = -retVal.axis3;
}
// std::cout << "Solvent: Axis 1 = " << retVal.axis1;
// std::cout << ": d1 = " << v1.Dot(retVal.axis1) << "; d2 = " <<
// v2.Dot(retVal.axis1) << std::endl; std::cout << "Solvent: Axis 2 = " <<
// retVal.axis2; std::cout << ": d1 = " << v1.Dot(retVal.axis2) << "; d2 = "
// << v2.Dot(retVal.axis2) << std::endl; std::cout << "Solvent: Axis 3 = " <<
// retVal.axis3; std::cout << ": d1 = " << v1.Dot(retVal.axis3) << "; d2 = "
// << v2.Dot(retVal.axis3) << std::endl;
spdlog::debug("Solvent: Axis 1 = {}: d1 = {}; d2 = {}",
retVal.axis1, v1.Dot(retVal.axis1), v2.Dot(retVal.axis1));
spdlog::debug("Solvent: Axis 2 = {}: d1 = {}; d2 = {}",
retVal.axis2, v1.Dot(retVal.axis2), v2.Dot(retVal.axis2));
spdlog::debug("Solvent: Axis 3 = {}: d1 = {}; d2 = {}",
retVal.axis3, v1.Dot(retVal.axis3), v2.Dot(retVal.axis3));
return retVal;
}
......@@ -169,26 +169,16 @@ RbtPrincipalAxes Rbt::GetPrincipalAxes(const RbtAtomList &atomList) {
RbtCoord c0 = (atomList.front())->GetCoords() - principalAxes.com;
double d1 = c0.Dot(principalAxes.axis1);
double d2 = c0.Dot(principalAxes.axis2);
// RbtDouble d3 = c0.Dot(principalAxes.axis3);
// std::cout << "Before: d1,d2,d3=" << d1 << "\t" << d2 << "\t" << d3 <<
// std::endl;
spdlog::debug("Before: d1,d2,d3={} {} {}", d1, d2, c0.Dot(principalAxes.axis3));
if (d1 < 0.0)
principalAxes.axis1 = -principalAxes.axis1;
if (d2 < 0.0)
principalAxes.axis2 = -principalAxes.axis2;
principalAxes.axis3 = Rbt::Cross(principalAxes.axis1, principalAxes.axis2);
// d1 = c0.Dot(principalAxes.axis1);
// d2 = c0.Dot(principalAxes.axis2);
// d3 = c0.Dot(principalAxes.axis3);
// std::cout << "After: d1,d2,d3=" << d1 << "\t" << d2 << "\t" << d3 <<
// std::endl;
// std::cout << "(Eigen) Axis1=" << principalAxes.axis1 << "; Moment1=" <<
// principalAxes.moment1 << std::endl; std::cout << "(Eigen) Axis2=" <<
// principalAxes.axis2
// << "; Moment2=" << principalAxes.moment2 << std::endl; std::cout <<
// "(Eigen) Axis3=" << principalAxes.axis3 << "; Moment3=" <<
// principalAxes.moment3 << std::endl;
spdlog::debug("After: d1,d2,d3={} {} {}", c0.Dot(principalAxes.axis1), c0.Dot(principalAxes.axis2), c0.Dot(principalAxes.axis3));
spdlog::debug("(Eigen) Axis1={}; Moment1=", principalAxes.axis1, principalAxes.moment1);
spdlog::debug("(Eigen) Axis2={}; Moment2=", principalAxes.axis2, principalAxes.moment2);
spdlog::debug("(Eigen) Axis3={}; Moment3=", principalAxes.axis3, principalAxes.moment3);
return principalAxes;
}
......
......@@ -13,6 +13,7 @@
#include "RbtPsfFileSource.h"
#include "RbtElementFileSource.h"
#include "RbtFileError.h"
#include <spdlog/spdlog.h>
// Constructors
// RbtPsfFileSource::RbtPsfFileSource(const char* fileName) :
......@@ -163,11 +164,11 @@ void RbtPsfFileSource::Parse() {
unsigned int nBondRec;
fileIter++;
std::istringstream(*fileIter) >> nBondRec >> strKey;
// std::cout << "strKey "<<strKey << " strBondKey " << strBondKey <<
// std::endl; if(strBondKey.compare(strKey,0,6)) {// 6 for "!NBOND" old
spdlog::debug("strKey {} strBondKey {}", strKey, strBondKey);
// if(strBondKey.compare(strKey,0,6)) {// 6 for "!NBOND" old
// style API
int iCmp = strBondKey.compare(0, 5, strKey);
// std::cout << "iCmp = " << iCmp << std::endl;
spdlog::debug("iCmp = {}", iCmp);
if (iCmp > 0) { // 6 for "!NBOND" new API
throw RbtFileParseError(_WHERE_, "Missing " + strBondKey +
" string in " + GetFileName());
......@@ -281,8 +282,7 @@ void RbtPsfFileSource::SetupVdWRadii() {
// masses.rtf defines hybrid state as TRI so switch here if necessary
if ((nAtomicNo == 7) && bIsTri(*iter) && bTwoBonds(*iter)) {
(*iter)->SetHybridState(RbtAtom::SP2);
// std::cout << "Switch from N_tri to N_sp2: " <<
// (*iter)->GetFullAtomName() << std::endl;
spdlog::debug("Switch from N_tri to N_sp2: {}", (*iter)->GetFullAtomName());
}
RbtElementData elData = m_spElementData->GetElementData(nAtomicNo);
double vdwRadius = elData.vdwRadius;
......@@ -302,11 +302,7 @@ void RbtPsfFileSource::SetupVdWRadii() {
}
// Finally we can set the radius
(*iter)->SetVdwRadius(vdwRadius);
#ifdef _DEBUG
// std::cout << (*iter)->GetFullAtomName() << ": #H=" << nImplH
//<< "; vdwR=" << (*iter)->GetVdwRadius()
//<< "; mass=" << (*iter)->GetAtomicMass() << std::endl;
#endif //_DEBUG
spdlog::debug("{}: #H= {}; vdwR={}; mass={}", (*iter)->GetFullAtomName(), nImplH, (*iter)->GetVdwRadius(), (*iter)->GetAtomicMass());
}
}
......@@ -326,10 +322,7 @@ void RbtPsfFileSource::SetupPartialIonicGroups() {
RbtAtomList ss;
std::copy_if(iter, m_atomList.end(), std::back_inserter(ss),
isSS_eq(*iter));
// std::cout << "Psf SetupPartialIonicGroups: SS from " <<
// ss.front()->GetFullAtomName()
// << " to " << ss.back()->GetFullAtomName() << " (" << ss.size() << ")
// atoms" << std::endl; Assign group charges for this residue
spdlog::debug("Psf SetupPartialIonicGroups: SS from {} to {} ({}) atoms", ss.front()->GetFullAtomName(), ss.back()->GetFullAtomName(), ss.size());
RbtBaseMolecularFileSource::SetupPartialIonicGroups(ss, m_spParamSource);
// Mark each atom in substructure as having been processed
std::for_each(ss.begin(), ss.end(), Rbt::SelectAtom(true));
......@@ -355,10 +348,7 @@ void RbtPsfFileSource::RemoveNonPolarHydrogens() {
// Adjust number of implicit hydrogens
(*cIter)->SetNumImplicitHydrogens((*cIter)->GetNumImplicitHydrogens() +
nImplH);
#ifdef _DEBUG
std::cout << "Removing " << nImplH << " hydrogens from "
<< (*cIter)->GetFullAtomName() << std::endl;
#endif //_DEBUG
spdlog::debug("Removing {} hydrogens from {}", nImplH, (*cIter)->GetFullAtomName());
}
}
}
......@@ -11,6 +11,7 @@
***********************************************************************/
#include "RbtRandLigTransform.h"
#include <spdlog/spdlog.h>
// Static data member for class type
std::string RbtRandLigTransform::_CT("RbtRandLigTransform");
......@@ -23,16 +24,12 @@ RbtRandLigTransform::RbtRandLigTransform(const std::string &strName)
: RbtBaseUniMolTransform(_CT, strName), m_rand(Rbt::GetRbtRand()) {
// Add parameters
AddParameter(_TORS_STEP, 180);
#ifdef _DEBUG
std::cout << _CT << " parameterised constructor" << std::endl;
#endif //_DEBUG
spdlog::trace("RbtRandLigTransform parameterised constructor");
_RBTOBJECTCOUNTER_CONSTR_(_CT);
}
RbtRandLigTransform::~RbtRandLigTransform() {
#ifdef _DEBUG
std::cout << _CT << " destructor" << std::endl;
#endif //_DEBUG
spdlog::trace("RbtRandLigTransform destructor");
_RBTOBJECTCOUNTER_DESTR_(_CT);
}
......
......@@ -14,6 +14,7 @@
#include "RbtChrom.h"
#include "RbtPopulation.h"
#include "RbtWorkSpace.h"
#include <spdlog/spdlog.h>
std::string RbtRandPopTransform::_CT("RbtRandPopTransform");
std::string RbtRandPopTransform::_POP_SIZE("POP_SIZE");
......@@ -61,9 +62,7 @@ void RbtRandPopTransform::Execute() {
int chromLength = m_chrom->GetLength();
popSize *= chromLength;
}
if (GetTrace() > 3) {
std::cout << _CT << ": popSize=" << popSize << std::endl;
}
spdlog::trace("RbtRandPopTransform: popSize={}", popSize);
RbtPopulationPtr pop = new RbtPopulation(m_chrom, popSize, pSF);
pop->Best()->GetChrom()->SyncToModel();
GetWorkSpace()->SetPopulation(pop);
......
......@@ -12,7 +12,7 @@
#include <algorithm> //for min, max, count
#include <cstring>
#include <iomanip>
#include <spdlog/spdlog.h>
#include "RbtFileError.h"
#include "RbtRealGrid.h"
......@@ -148,23 +148,16 @@ double RbtRealGrid::GetSmoothedValue(const RbtCoord &c) const {
unsigned int iX = int(rx * (c.x - gridMin.x) - 0.5) + 1;
unsigned int iY = int(ry * (c.y - gridMin.y) - 0.5) + 1;
unsigned int iZ = int(rz * (c.z - gridMin.z) - 0.5) + 1;
#ifdef _DEBUG
std::cout << "GetSmoothedValue" << c << "\tiX,iY,iZ=" << iX << "\t" << iY
<< "\t" << iZ << std::endl;
#endif //_DEBUG
spdlog::debug("GetSmoothedValue {} iX,iY,iZ={} {} {}", c, iX, iY, iZ);
// Check this point (iX,iY,iZ) and (iX+1,iY+1,iZ+1) are all in bounds
// else return the unsmoothed GetValue(c)
if (!isValid(iX, iY, iZ) || !isValid(iX + 1, iY + 1, iZ + 1)) {
#ifdef _DEBUG
std::cout << "Out of bounds" << std::endl;
#endif //_DEBUG
spdlog::debug("Out of bounds");
return GetValue(c);
}
// p is the vector relative to the lower left corner
RbtVector p = c - GetCoord(iX, iY, iZ);
#ifdef _DEBUG
std::cout << "p=" << p << std::endl;
#endif //_DEBUG
spdlog::debug("p={}", p);
// Set up B0 and B1 for each of x,y,z axes
// RbtDoubleList bx(2);
// RbtDoubleList by(2);
......
......@@ -11,6 +11,7 @@
***********************************************************************/
#include "RbtRotSF.h"
#include <spdlog/spdlog.h>
// Static data member for class type
std::string RbtRotSF::_CT("RbtRotSF");
......@@ -22,16 +23,12 @@ RbtRotSF::RbtRotSF(const std::string &strName)
// Add parameters
AddParameter(_INCNH3, bIncNH3);
AddParameter(_INCOH, bIncOH);
#ifdef _DEBUG
std::cout << _CT << " parameterised constructor" << std::endl;
#endif //_DEBUG
spdlog::trace("RbtRotSF parameterised constructor");
_RBTOBJECTCOUNTER_CONSTR_(_CT);
}
RbtRotSF::~RbtRotSF() {
#ifdef _DEBUG
std::cout << _CT << " destructor" << std::endl;
#endif //_DEBUG
spdlog::trace("RbtRotSF destructor");
_RBTOBJECTCOUNTER_DESTR_(_CT);
}
......
This diff is collapsed.
......@@ -400,9 +400,7 @@ void HHS_Solvation::Partition(double d) {