Commit dd5a3814 authored by Vedran Miletić's avatar Vedran Miletić

Partially fix building on Windows

Defines M_PI where needed, adds include <iterator> and <functional>
where they are missing, replaces static variable size array allocation
with dynamic allocation, and avoid using names from winbase.h:
* FindAtom -> FindAtomInList
* GetAtomName -> GetName
* GetCurrentDirectory -> GetCurrentWorkingDirectory
parent b8089f17
......@@ -37,7 +37,7 @@ std::string GetProduct();
// GetTime - returns current time and date as an RbtString
std::string GetTime();
// GetCurrentDirectory - returns current working directory
std::string GetCurrentDirectory();
std::string GetCurrentWorkingDirectory();
//
////////////////////////////////////////////////////////////////
......
......@@ -112,7 +112,7 @@ public:
void SetAtomicNo(const int nAtomicNo) { m_nAtomicNo = nAtomicNo; }
// AtomName
std::string GetAtomName() const { return m_strAtomName; }
std::string GetName() const { return m_strAtomName; }
void SetAtomName(const std::string strAtomName) {
m_strAtomName = strAtomName;
}
......@@ -541,7 +541,7 @@ class isAtomName_eq : public std::unary_function<RbtAtom *, bool> {
public:
explicit isAtomName_eq(const std::string &ss) : s(ss) {}
bool operator()(const RbtAtom *pAtom) const {
return pAtom->GetAtomName() == s;
return pAtom->GetName() == s;
}
};
......@@ -610,7 +610,7 @@ public:
bool operator()(const RbtAtom *pAtom1, const RbtAtom *pAtom2) const {
return ((pAtom1->GetSubunitId() == pAtom2->GetSubunitId()) &&
(pAtom1->GetSubunitName() == pAtom2->GetSubunitName()) &&
(pAtom1->GetAtomName() == pAtom2->GetAtomName()));
(pAtom1->GetName() == pAtom2->GetName()));
}
};
......@@ -881,7 +881,7 @@ public:
class RbtAtomPtrCmp_AtomName {
public:
bool operator()(RbtAtom *pAtom1, RbtAtom *pAtom2) const {
return pAtom1->GetAtomName() < pAtom2->GetAtomName();
return pAtom1->GetName() < pAtom2->GetName();
}
};
......@@ -1014,7 +1014,7 @@ RbtAtomList GetAtomList(const RbtAtomList &atomList, const Predicate &pred) {
// Generic template version of FindAtom, passing in your own predicate
template <class Predicate>
RbtAtomListIter FindAtom(RbtAtomList &atomList, const Predicate &pred) {
RbtAtomListIter FindAtomInList(RbtAtomList &atomList, const Predicate &pred) {
return std::find_if(atomList.begin(), atomList.end(), pred);
}
......
......@@ -18,9 +18,14 @@
#define _RBTCOORD_H_
#include <algorithm> //for min,max
#include <iterator> //for back_inserter
#include <cmath> //for sqrt
#include <numeric> //for accumulate
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#include "RbtConfig.h"
extern std::istream &eatSeps(std::istream &is);
......
......@@ -67,7 +67,7 @@ RbtReturnType RbtGPParser::Parse1Output(RbtGPChromosomePtr chrom, int output) {
int startCell = (nFunctionsInputs + 1) * (output - nProgramInputs);
int ncomm = (*chrom)[startCell + nFunctionsInputs];
int nargs = commands[ncomm]->GetNArgs();
RbtReturnType args[nargs];
RbtReturnType* args = new RbtReturnType[nargs];
// I had this two loops as one before, but because is a
// recursive function, they MUST be separated, otherwise the command
// can get the arguments from another cell
......@@ -75,6 +75,7 @@ RbtReturnType RbtGPParser::Parse1Output(RbtGPChromosomePtr chrom, int output) {
args[i] = Eval(chrom, (*chrom)[startCell + i]);
for (int i = 0; i < nargs; i++)
commands[ncomm]->SetArg(i, args[i]);
delete[] args;
return (commands[ncomm]->Execute());
}
......
......@@ -388,7 +388,7 @@ int main(int argc, char *argv[]) {
RbtVariant vExe(strExeName + EXEVERSION);
RbtVariant vRecep(spRecepPrmSource->GetFileName());
RbtVariant vPrm(spParamSource->GetFileName());
RbtVariant vDir(Rbt::GetCurrentDirectory());
RbtVariant vDir(Rbt::GetCurrentWorkingDirectory());
spRecepPrmSource->SetSection();
// Read docking site from file and register with workspace
......
......@@ -15,6 +15,7 @@
#include "RbtMdlFileSink.h"
#include "RbtMdlFileSource.h"
#include <algorithm> //for min,max
#include <functional>
#include <iomanip>
const std::string EXEVERSION =
......@@ -94,17 +95,17 @@ void CheckAmideBonds(RbtModelPtr spModel) {
// Find bonded O_SP2 and H (if any)
RbtAtomList bondedAtomsN = Rbt::GetBondedAtomList(spN);
RbtAtomList bondedAtomsC = Rbt::GetBondedAtomList(spC);
RbtAtomListIter oIter = Rbt::FindAtom(bondedAtomsC, bIsO_SP2);
RbtAtomListIter hIter = Rbt::FindAtom(bondedAtomsN, bIsH);
RbtAtomListIter oIter = Rbt::FindAtomInList(bondedAtomsC, bIsO_SP2);
RbtAtomListIter hIter = Rbt::FindAtomInList(bondedAtomsN, bIsH);
if ((oIter != bondedAtomsC.end()) && (hIter != bondedAtomsN.end())) {
RbtAtomPtr spH = (*hIter);
RbtAtomPtr spO = (*oIter);
double phi = Rbt::BondDihedral(spH, spN, spC, spO);
std::cout << spH->GetAtomName() << "(" << spH->GetFFType() << ") - "
<< spN->GetAtomName() << "(" << spN->GetFFType() << ") - "
<< spC->GetAtomName() << "(" << spC->GetFFType() << ") - "
<< spO->GetAtomName() << "(" << spO->GetFFType() << "): " << phi
std::cout << spH->GetName() << "(" << spH->GetFFType() << ") - "
<< spN->GetName() << "(" << spN->GetFFType() << ") - "
<< spC->GetName() << "(" << spC->GetFFType() << ") - "
<< spO->GetName() << "(" << spO->GetFFType() << "): " << phi
<< " deg" << std::endl;
double deltaPhi = 180.0 - phi;
std::cout << "Rotating bond by " << deltaPhi << " deg" << std::endl;
......@@ -112,8 +113,8 @@ void CheckAmideBonds(RbtModelPtr spModel) {
phi = Rbt::BondDihedral(spH, spN, spC, spO);
std::cout << "Dihedral is now " << phi << " deg" << std::endl;
} else {
std::cout << spN->GetAtomName() << "(" << spN->GetFFType() << ") - "
<< spC->GetAtomName() << "(" << spC->GetFFType()
std::cout << spN->GetName() << "(" << spN->GetFFType() << ") - "
<< spC->GetName() << "(" << spC->GetFFType()
<< "): TERTIARY" << std::endl;
}
}
......@@ -317,8 +318,8 @@ int main(int argc, char *argv[]) {
bIter != rotatableBondList.end(); bIter++) {
RbtAtomPtr spAtom1 = (*bIter)->GetAtom1Ptr();
RbtAtomPtr spAtom2 = (*bIter)->GetAtom2Ptr();
std::cout << spAtom1->GetAtomName() << "(" << spAtom1->GetFFType()
<< ") - " << spAtom2->GetAtomName() << "("
std::cout << spAtom1->GetName() << "(" << spAtom1->GetFFType()
<< ") - " << spAtom2->GetName() << "("
<< spAtom2->GetFFType() << ")" << std::endl;
}
} else {
......
......@@ -12,6 +12,7 @@
// Calculates atomic RMSD of each SD record with record #1
#include <functional>
#include <sstream>
#include "RbtMdlFileSink.h"
......
......@@ -193,7 +193,7 @@ int main(int argc, char *argv[]) {
RbtVariant vLib(Rbt::GetProduct() + " (" + Rbt::GetVersion() + ", Build" +
Rbt::GetBuild() + ")");
RbtVariant vExe(strExeName + EXEVERSION);
RbtVariant vDir(Rbt::GetCurrentDirectory());
RbtVariant vDir(Rbt::GetCurrentWorkingDirectory());
///////////////////////////////////
// MAIN LOOP OVER LIGAND RECORDS
///////////////////////////////////
......
......@@ -31,7 +31,7 @@ std::string Rbt::GetRbtRoot() {
if (szRbtRoot != (char *)nullptr) {
return std::string(szRbtRoot);
} else {
return GetCurrentDirectory();
return GetCurrentWorkingDirectory();
}
}
......@@ -48,7 +48,7 @@ std::string Rbt::GetRbtHome() {
if (szRbtHome != (char *)nullptr) {
return std::string(szRbtHome);
} else {
return GetCurrentDirectory();
return GetCurrentWorkingDirectory();
}
}
}
......@@ -68,7 +68,7 @@ std::string Rbt::GetTime() {
return std::string(std::asctime(pLocalTime)); // Convert to ascii string
}
// GetCurrentDirectory - returns current working directory
std::string Rbt::GetCurrentDirectory() {
std::string Rbt::GetCurrentWorkingDirectory() {
std::string strCwd(".");
char *szCwd = new char[PATH_MAX + 1]; // Allocate a temp char* array
if (::getcwd(szCwd, PATH_MAX) != (char *)nullptr) { // Get the cwd
......@@ -302,7 +302,7 @@ std::ostream &Rbt::PrintStdHeader(std::ostream &s,
<< std::endl;
s << "RBT_ROOT:\t" << GetRbtRoot() << std::endl;
s << "RBT_HOME:\t" << GetRbtHome() << std::endl;
s << "Current dir:\t" << GetCurrentDirectory() << std::endl;
s << "Current dir:\t" << GetCurrentWorkingDirectory() << std::endl;
s << "Date:\t\t" << GetTime();
s << "***********************************************" << std::endl;
return s;
......
......@@ -13,6 +13,8 @@
#include "RbtAnnotation.h"
#include "RbtPseudoAtom.h"
#include <functional>
////////////////////////////////////////
// Constructors/destructors
RbtAnnotation::RbtAnnotation(const RbtAtom *pAtom1, const RbtAtom *pAtom2,
......
......@@ -836,11 +836,11 @@ void Rbt::PrintQuantaCSDFormat(const RbtAtomList &atomList, std::ostream &s,
switch (nFormat) {
case 0:
s << "zone " << spAtom->GetSegmentName() << ":" << spAtom->GetSubunitId()
<< " # pick " << spAtom->GetAtomName() << " = col " << nColor
<< " # pick " << spAtom->GetName() << " = col " << nColor
<< std::endl;
break;
default:
s << "pick " << spAtom->GetAtomName() << " .and. segm "
s << "pick " << spAtom->GetName() << " .and. segm "
<< spAtom->GetSegmentName() << " = col " << nColor << std::endl;
}
}
......
......@@ -242,8 +242,8 @@ void RbtBaseMolecularFileSource::RemoveAtom(RbtAtomPtr spAtom) {
Rbt::FindBond(m_bondList, Rbt::isBond_eq((*mapIter).first));
if (bIter != m_bondList.end()) {
spdlog::debug("Removing bond #{} ({}-{})", (*bIter)->GetBondId(),
(*bIter)->GetAtom1Ptr()->GetAtomName(),
(*bIter)->GetAtom2Ptr()->GetAtomName());
(*bIter)->GetAtom1Ptr()->GetName(),
(*bIter)->GetAtom2Ptr()->GetName());
m_bondList.erase(bIter); // Erase the bond
}
}
......@@ -254,10 +254,10 @@ void RbtBaseMolecularFileSource::RemoveAtom(RbtAtomPtr spAtom) {
// risky) RbtAtomListIter aIter =
// Rbt::FindAtom(m_atomList,std::bind2nd(Rbt::isAtomPtr_eq(),spAtom));
RbtAtomListIter aIter =
Rbt::FindAtom(m_atomList, std::bind2nd(Rbt::isAtom_eq(), spAtom));
Rbt::FindAtomInList(m_atomList, std::bind2nd(Rbt::isAtom_eq(), spAtom));
if (aIter != m_atomList.end()) {
spdlog::debug("Removing atom #{}, {}", (*aIter)->GetAtomId(),
(*aIter)->GetAtomName());
(*aIter)->GetName());
m_atomList.erase(aIter); // Erase the atom
}
}
......
......@@ -99,13 +99,13 @@ void RbtChromDihedralRefData::Setup(RbtBondPtr spBond,
m_atom3 = pAtom2;
m_atom4 = bondedAtoms2.front();
spdlog::debug("Inverted: {} atoms now selected", Rbt::GetNumSelectedAtoms(atomList));
spdlog::debug("Dihedral spec: {}\t{}\t{}\t{}", bondedAtoms3.front()->GetAtomName(), pAtom3->GetAtomName(), pAtom2->GetAtomName(), bondedAtoms2.front()->GetAtomName());
spdlog::debug("Dihedral spec: {}\t{}\t{}\t{}", bondedAtoms3.front()->GetName(), pAtom3->GetName(), pAtom2->GetName(), bondedAtoms2.front()->GetName());
} else {
m_atom1 = bondedAtoms2.front();
m_atom2 = pAtom2;
m_atom3 = pAtom3;
m_atom4 = bondedAtoms3.front();
spdlog::debug("Dihedral spec: {}\t{}\t{}\t{}", bondedAtoms2.front()->GetAtomName(), pAtom2->GetAtomName(), pAtom3->GetAtomName(), bondedAtoms3.front()->GetAtomName());
spdlog::debug("Dihedral spec: {}\t{}\t{}\t{}", bondedAtoms2.front()->GetName(), pAtom2->GetName(), pAtom3->GetName(), bondedAtoms3.front()->GetName());
}
// Store the smaller atom list (or free atom list in tethered mode) for this
......
......@@ -117,7 +117,7 @@ void RbtCrdFileSink::Render() {
<< std::setw(0) << " ";
ostr.setf(std::ios_base::left, std::ios_base::adjustfield);
ostr << std::setw(4) << spAtom->GetSubunitName().c_str() << std::setw(0)
<< " " << std::setw(4) << spAtom->GetAtomName().c_str();
<< " " << std::setw(4) << spAtom->GetName().c_str();
ostr.setf(std::ios_base::right, std::ios_base::adjustfield);
ostr << std::setw(10) << spAtom->GetX() << std::setw(10) << spAtom->GetY()
<< std::setw(10) << spAtom->GetZ() << std::setw(0) << " ";
......
......@@ -30,7 +30,7 @@ double RbtDihedral::operator()() const {
score +=
m_prms[i].k *
(1.0 + m_prms[i].sign * std::cos(m_prms[i].s * dih1 * M_PI / 180.0));
spdlog::debug("{},{},{},{}\t{:.3f}\t{:.3f}\t{:.3f}\t{:.3f}\t{:.3f}\t{:.3f}", m_pAtom1->GetAtomName(), m_pAtom2->GetAtomName(), m_pAtom3->GetAtomName(), m_pAtom4->GetAtomName(), m_prms[i].sign, m_prms[i].s, m_prms[i].k, dih, dih1, score);
spdlog::debug("{},{},{},{}\t{:.3f}\t{:.3f}\t{:.3f}\t{:.3f}\t{:.3f}\t{:.3f}", m_pAtom1->GetName(), m_pAtom2->GetName(), m_pAtom3->GetName(), m_pAtom4->GetName(), m_prms[i].sign, m_prms[i].s, m_prms[i].k, dih, dih1, score);
}
return score;
}
......@@ -90,7 +90,7 @@ RbtDihedralList RbtDihedralSF::CreateDihedralList(const RbtBondList &bondList) {
for (unsigned int i1 = 0; i1 != offset2.size(); i1++) {
dihprms = FindDihedralParams(RbtTriposAtomType::H, t2, t3, t4);
dihprms.offset = offset2[i1];
spdlog::debug("RbtDihedralSF::CreateDihedralList: <H{}>-{}-{}-{}\toffset = {}", i1 + 1, pAtom2->GetAtomName(), pAtom3->GetAtomName(), pAtom4->GetAtomName(), dihprms.offset);
spdlog::debug("RbtDihedralSF::CreateDihedralList: <H{}>-{}-{}-{}\toffset = {}", i1 + 1, pAtom2->GetName(), pAtom3->GetName(), pAtom4->GetName(), dihprms.offset);
pDih->AddTerm(dihprms);
// Add all the ghost dihedral combinations for implicit Hs on
// pAtom2 AND on pAtom3 but only for the first time through the
......@@ -107,7 +107,7 @@ RbtDihedralList RbtDihedralSF::CreateDihedralList(const RbtBondList &bondList) {
dihprms.offset -= 360.0;
if (dihprms.offset < -180.0)
dihprms.offset += 360.0;
spdlog::debug("RbtDihedralSF::CreateDihedralList: <H{}>-{}-{}-<H{}>\toffset = {}", i1 + 1, pAtom2->GetAtomName(), pAtom3->GetAtomName(), i4 + 1, dihprms.offset);
spdlog::debug("RbtDihedralSF::CreateDihedralList: <H{}>-{}-{}-<H{}>\toffset = {}", i1 + 1, pAtom2->GetName(), pAtom3->GetName(), i4 + 1, dihprms.offset);
pDih->AddTerm(dihprms);
}
}
......@@ -122,7 +122,7 @@ RbtDihedralList RbtDihedralSF::CreateDihedralList(const RbtBondList &bondList) {
// Remember offset3 was determined looking the other way along the
// bond so sign is inverted
dihprms.offset = offset3[i4];
spdlog::debug("RbtDihedralSF::CreateDihedralList: {}-{}-{}-{}\toffset = {}", pAtom1->GetAtomName(), pAtom2->GetAtomName(), pAtom3->GetAtomName(), pAtom4->GetAtomName(), dihprms.offset);
spdlog::debug("RbtDihedralSF::CreateDihedralList: {}-{}-{}-{}\toffset = {}", pAtom1->GetName(), pAtom2->GetName(), pAtom3->GetName(), pAtom4->GetName(), dihprms.offset);
pDih->AddTerm(dihprms);
}
}
......@@ -220,7 +220,7 @@ void RbtDihedralSF::CalcBondedAtoms(RbtAtom *pAtom1, RbtAtom *pAtom2,
int nH = pAtom1->GetNumImplicitHydrogens();
if (nH == 0)
return;
spdlog::debug("RbtDihedralSF::CalcBondedAtoms: determining impl H offsets for {} - {}", pAtom1->GetAtomName(), pAtom2->GetAtomName());
spdlog::debug("RbtDihedralSF::CalcBondedAtoms: determining impl H offsets for {} - {}", pAtom1->GetName(), pAtom2->GetName());
RbtAtom::eHybridState hybrid = pAtom1->GetHybridState();
if (hybrid == RbtAtom::SP3) {
// SP3: hardest case first: 2 heavy atoms plus 1 implicit H
......@@ -230,12 +230,12 @@ void RbtDihedralSF::CalcBondedAtoms(RbtAtom *pAtom1, RbtAtom *pAtom2,
double improper =
Rbt::BondDihedral(bondedAtoms[0], pAtom1, pAtom2, bondedAtoms[1]);
double offset = -improper;
spdlog::debug("RbtDihedralSF::CalcBondedAtoms: offset for SP3 atom {} = {}", pAtom1->GetAtomName(), offset);
spdlog::debug("RbtDihedralSF::CalcBondedAtoms: offset for SP3 atom {} = {}", pAtom1->GetName(), offset);
offsets.push_back(offset);
}
// SP3: 1 heavy atom plus 2 implicit H, return both offsets of +/- 120 deg
else if ((nH == 2) && (bondedAtoms.size() == 1)) {
spdlog::debug("RbtDihedralSF::CalcBondedAtoms: offsets for SP3 atom {} = -120,+120" , pAtom1->GetAtomName());
spdlog::debug("RbtDihedralSF::CalcBondedAtoms: offsets for SP3 atom {} = -120,+120" , pAtom1->GetName());
offsets.push_back(-120.0);
offsets.push_back(+120.0);
} else {
......@@ -245,7 +245,7 @@ void RbtDihedralSF::CalcBondedAtoms(RbtAtom *pAtom1, RbtAtom *pAtom2,
// SP2: The only combination that makes sense is 1 heavy atom and 1 implicit
// hydrogen Offset is always 180 deg.
if ((nH == 1) && (bondedAtoms.size() == 1)) {
spdlog::debug("RbtDihedralSF::CalcBondedAtoms: offset for SP2 atom {} = 180", pAtom1->GetAtomName());
spdlog::debug("RbtDihedralSF::CalcBondedAtoms: offset for SP2 atom {} = 180", pAtom1->GetName());
offsets.push_back(-180.0);
} else {
spdlog::warn("RbtDihedralSF::CalcBondedAtoms: inconsistent bonding around SP2 atom {}", pAtom1->GetFullAtomName());
......
......@@ -475,7 +475,7 @@ void RbtMOL2FileSource::FixHybridState() {
case 8: // O
case 16: // S
bondedAtomList = Rbt::GetBondedAtomList(*iter);
if (Rbt::FindAtom(bondedAtomList, Rbt::isPiAtom()) !=
if (Rbt::FindAtomInList(bondedAtomList, Rbt::isPiAtom()) !=
bondedAtomList.end()) {
(*iter)->SetHybridState(RbtAtom::TRI);
spdlog::debug("Changing {} from SP3 to TRI", (*iter)->GetFullAtomName());
......
This diff is collapsed.
......@@ -101,13 +101,13 @@ void RbtModelMutator::Setup() {
m_dih3Atoms.push_back(pAtom2);
m_dih4Atoms.push_back(bondedAtoms2.front());
spdlog::debug("Inverted: {} atoms now selected", Rbt::GetNumSelectedAtoms(m_pModel->m_atomList));
spdlog::debug("Dihedral spec: {}\t{}\t{}\t{}", bondedAtoms3.front()->GetAtomName(), pAtom3->GetAtomName(), pAtom2->GetAtomName(), bondedAtoms2.front()->GetAtomName());
spdlog::debug("Dihedral spec: {}\t{}\t{}\t{}", bondedAtoms3.front()->GetName(), pAtom3->GetName(), pAtom2->GetName(), bondedAtoms2.front()->GetName());
} else {
m_dih1Atoms.push_back(bondedAtoms2.front());
m_dih2Atoms.push_back(pAtom2);
m_dih3Atoms.push_back(pAtom3);
m_dih4Atoms.push_back(bondedAtoms3.front());
spdlog::debug("Dihedral spec: {}\t{}\t{}\t{}", bondedAtoms2.front()->GetAtomName(), pAtom2->GetAtomName(), pAtom3->GetAtomName(), bondedAtoms3.front()->GetAtomName());
spdlog::debug("Dihedral spec: {}\t{}\t{}\t{}", bondedAtoms2.front()->GetName(), pAtom2->GetName(), pAtom3->GetName(), bondedAtoms3.front()->GetName());
}
// Store the smaller atom list (or free atom list in tethered mode) for this
......
......@@ -38,7 +38,7 @@ RbtPseudoAtom::RbtPseudoAtom(const RbtAtomList &atomList, int nAtomId,
RbtAtomPtr spAtomN(atomList.back()); // Last atom in list
// Pseudo-atom name is i the format [C1..N4]
strAtomName +=
"[" + spAtom1->GetAtomName() + ".." + spAtomN->GetAtomName() + "]";
"[" + spAtom1->GetName() + ".." + spAtomN->GetName() + "]";
SetAtomName(strAtomName);
SetSubunitId(spAtom1->GetSubunitId());
SetSubunitName(spAtom1->GetSubunitName());
......
......@@ -87,7 +87,7 @@ void RbtPsfFileSink::Render() {
sprintf(line, "%8d %-4.4s %-4.4s %-4.4s %-4.4s %-4.4s%15.3f%10.3f%12.1f",
spAtom->GetAtomId(), spAtom->GetSegmentName().c_str(),
spAtom->GetSubunitId().c_str(), spAtom->GetSubunitName().c_str(),
spAtom->GetAtomName().c_str(), spAtom->GetFFType().c_str(),
spAtom->GetName().c_str(), spAtom->GetFFType().c_str(),
spAtom->GetPartialCharge(), spAtom->GetAtomicMass(), 0.0);
AddLine(line);
// Render the atom to a string stream
......
......@@ -118,7 +118,7 @@ void RbtSetupPolarSF::SetupAtomList(RbtAtomList &atomList,
}
// XB apply reweighting factor for receptor's polar atoms:
// (*iter)->SetUser1Value(fNeighb*charge*wxb);
spdlog::debug("Atom: {} Polar_User1Value: {} weight: {}", (*iter)->GetAtomName(), (*iter)->GetUser1Value(), (*iter)->GetReweight());
spdlog::debug("Atom: {} Polar_User1Value: {} weight: {}", (*iter)->GetName(), (*iter)->GetUser1Value(), (*iter)->GetReweight());
(*iter)->SetUser1Value(fNeighb * charge);
(*iter)->SetUser1Flag(bIsLipo(*iter));
......
......@@ -91,7 +91,7 @@ double RbtVdwSF::VdwScore(const RbtAtom *pAtom,
// iter2 points to the vdw params for this atom type pair
RbtVdwRowConstIter iter2 = (*iter1).begin() + type2;
double s = f4_8(R_sq, *iter2);
spdlog::debug("4-8vdw {} weight: {} score {} score*w {}", (*iter)->GetAtomName(), (*iter)->GetReweight(), s, s * (*iter)->GetReweight());
spdlog::debug("4-8vdw {} weight: {} score {} score*w {}", (*iter)->GetName(), (*iter)->GetReweight(), s, s * (*iter)->GetReweight());
score += s;
}
}
......@@ -105,7 +105,7 @@ double RbtVdwSF::VdwScore(const RbtAtom *pAtom,
// iter2 points to the vdw params for this atom type pair
RbtVdwRowConstIter iter2 = (*iter1).begin() + type2;
double s = f6_12(R_sq, *iter2);
spdlog::debug("6-12vdw {} weight: {} score {} score*w {}", (*iter)->GetAtomName(), (*iter)->GetReweight(), s, s * (*iter)->GetReweight());
spdlog::debug("6-12vdw {} weight: {} score {} score*w {}", (*iter)->GetName(), (*iter)->GetReweight(), s, s * (*iter)->GetReweight());
if (s != 0.0) {
score += s;
RbtAnnotationPtr spAnnotation(
......@@ -124,7 +124,7 @@ double RbtVdwSF::VdwScore(const RbtAtom *pAtom,
// iter2 points to the vdw params for this atom type pair
RbtVdwRowConstIter iter2 = (*iter1).begin() + type2;
double s = f6_12(R_sq, *iter2);
spdlog::debug("6-12vdw {} weight: {} score {} score*w {}", (*iter)->GetAtomName(), (*iter)->GetReweight(), s, s * (*iter)->GetReweight());
spdlog::debug("6-12vdw {} weight: {} score {} score*w {}", (*iter)->GetName(), (*iter)->GetReweight(), s, s * (*iter)->GetReweight());
score += s;
}
}
......
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