diff --git a/include/GP/RbtCell.h b/include/GP/RbtCell.h index f85efda6..9b22c772 100644 --- a/include/GP/RbtCell.h +++ b/include/GP/RbtCell.h @@ -60,7 +60,7 @@ class RbtCell { evaluated = true; constant = true; ostringstream nm; - nm << r << ends; + nm << r; name = nm.str(); }; void ResetConstant() { diff --git a/include/RbtConfig.h b/include/RbtConfig.h index b12e8962..04330eab 100644 --- a/include/RbtConfig.h +++ b/include/RbtConfig.h @@ -22,7 +22,6 @@ using std::cerr; using std::cout; using std::endl; -using std::ends; using std::ios_base; using std::istream; using std::istringstream; diff --git a/include/RbtContext.h b/include/RbtContext.h index 9b2f5c2d..7a9eefc8 100644 --- a/include/RbtContext.h +++ b/include/RbtContext.h @@ -67,7 +67,7 @@ class RbtCellContext: public RbtContext { vm[key]->SetValue(val); else { ostringstream s; - s << val << ends; + s << val; vm[key] = new RbtVble(s.str(), val); } } diff --git a/include/RbtVariant.h b/include/RbtVariant.h index 8f0c9c43..b2286c80 100644 --- a/include/RbtVariant.h +++ b/include/RbtVariant.h @@ -19,7 +19,6 @@ #include using std::cout; -using std::ends; using std::istringstream; using std::ostringstream; @@ -155,7 +154,7 @@ class RbtVariant { ostringstream ostr; // Don't need "ends" with ostringstream apparently //(was introducing a non-ASCII \0 char into log files - // ostr << d << ends; + // ostr << d; ostr << d; RbtString s(ostr.str()); m_sl.push_back(s); @@ -186,7 +185,7 @@ class RbtVariant { ostringstream ostr; // Don't need "ends" with ostringstream apparently //(was introducing a non-ASCII \0 char into log files - // ostr << c << ends; + // ostr << c; ostr << c; RbtString s(ostr.str()); m_sl.push_back(s); diff --git a/include/RbtVble.h b/include/RbtVble.h index 37e96cb9..ecf46a0f 100644 --- a/include/RbtVble.h +++ b/include/RbtVble.h @@ -41,7 +41,7 @@ class RbtVble { value = val; if (name == "") { ostringstream s; - s << value << ends; + s << value; name = s.str(); } } diff --git a/src/GP/RbtGPParser.cxx b/src/GP/RbtGPParser.cxx index 65ce8042..f9459661 100644 --- a/src/GP/RbtGPParser.cxx +++ b/src/GP/RbtGPParser.cxx @@ -107,9 +107,9 @@ RbtString RbtGPParser::PrintEval(RbtGPChromosomePtr chrom, RbtInt n, RbtBool num if (numbers) { nm << "("; nm << n << " "; - nm << o << ") " << ends; + nm << o << ") "; } else - nm << o << ends; + nm << o; chrom->Cells(n)->SetName(nm.str()); return (nm.str()); } else diff --git a/src/exe/rbcavity.cxx b/src/exe/rbcavity.cxx index cf4ff458..36ec5c79 100644 --- a/src/exe/rbcavity.cxx +++ b/src/exe/rbcavity.cxx @@ -246,7 +246,7 @@ int main(int argc, const char *argv[]) { RbtCavityList cavList = spDockSite->GetCavityList(); for (RbtUInt i = 0; i < cavList.size(); i++) { ostringstream filename; - filename << wsName << "_cav" << i + 1 << ".grd" << ends; + filename << wsName << "_cav" << i + 1 << ".grd"; ofstream dumpFile(filename.str()); if (dumpFile) { cavList[i]->GetGrid()->PrintInsightGrid(dumpFile); diff --git a/src/exe/rbdock.cxx b/src/exe/rbdock.cxx index 6cd04455..e6ae3234 100644 --- a/src/exe/rbdock.cxx +++ b/src/exe/rbdock.cxx @@ -482,7 +482,7 @@ int main(int argc, const char *argv[]) { try { if (bOutput) { ostringstream histr; - histr << strRunName << "_" << strMolName << nRec << "_his_" << iRun << ".sd" << ends; + histr << strRunName << "_" << strMolName << nRec << "_his_" << iRun << ".sd"; RbtMolecularFileSinkPtr spHistoryFileSink(new RbtMdlFileSink(histr.str(), spLigand)); spWS->SetHistorySink(spHistoryFileSink); } diff --git a/src/exe/rbtether.cxx b/src/exe/rbtether.cxx index 90c240cd..b7519da5 100644 --- a/src/exe/rbtether.cxx +++ b/src/exe/rbtether.cxx @@ -274,5 +274,5 @@ void print_atoms(RbtAtomList &atoms, ostringstream &ost) { else ost << ","; } - ost << ends; + ost; } diff --git a/src/lib/RbtAnnotation.cxx b/src/lib/RbtAnnotation.cxx index 0b30c9f6..197606c0 100644 --- a/src/lib/RbtAnnotation.cxx +++ b/src/lib/RbtAnnotation.cxx @@ -76,7 +76,7 @@ RbtString RbtAnnotation::Render() const { } ostr.setf(ios_base::fixed, ios_base::floatfield); ostr.precision(2); - ostr << m_dist << "," << m_score << ends; + ostr << m_dist << "," << m_score; RbtString retVal(ostr.str()); return retVal; } diff --git a/src/lib/RbtAtom.cxx b/src/lib/RbtAtom.cxx index 308a5caa..b3305c19 100644 --- a/src/lib/RbtAtom.cxx +++ b/src/lib/RbtAtom.cxx @@ -352,7 +352,7 @@ RbtString Rbt::ConvertFormalChargeToString(RbtInt nCharge) { // For higher charges, return as +3,-3 etc ostringstream ostr; ostr.setf(ios_base::showpos); - ostr << nCharge << ends; + ostr << nCharge; RbtString strCharge(ostr.str()); return strCharge; } diff --git a/src/lib/RbtCharmmDataSource.cxx b/src/lib/RbtCharmmDataSource.cxx index e369a6a7..46a55dd1 100644 --- a/src/lib/RbtCharmmDataSource.cxx +++ b/src/lib/RbtCharmmDataSource.cxx @@ -11,7 +11,6 @@ ***********************************************************************/ #include -using std::ends; using std::ostringstream; #include "RbtCharmmDataSource.h" @@ -69,7 +68,7 @@ RbtString RbtCharmmDataSource::AtomTypeString(RbtInt nAtomType) { return (*iter).second; else { ostringstream ostr; - ostr << "CHARMm atom type #" << nAtomType << " not found in CharmmDataSource" << ends; + ostr << "CHARMm atom type #" << nAtomType << " not found in CharmmDataSource"; RbtString strError(ostr.str()); throw RbtFileMissingParameter(_WHERE_, strError); } diff --git a/src/lib/RbtConstraint.cxx b/src/lib/RbtConstraint.cxx index 8fe41904..39461d77 100644 --- a/src/lib/RbtConstraint.cxx +++ b/src/lib/RbtConstraint.cxx @@ -16,7 +16,6 @@ #include "RbtLigandError.h" -using std::ends; using std::ostringstream; // initialization of the static data of RbtConstraint @@ -206,7 +205,7 @@ void RbtHeavyConstraint::AddAtomList(RbtModelPtr lig, RbtBool bCheck) { m_atomList = Rbt::GetAtomList(lig->GetAtomList(), std::not1(Rbt::isAtomicNo_eq(1))); if (bCheck && (m_atomList.size() < counter)) { ostringstream ostr; - ostr << "The ligand has only " << m_atomList.size() << " heavy atom(s) (" << counter << " required)" << ends; + ostr << "The ligand has only " << m_atomList.size() << " heavy atom(s) (" << counter << " required)"; throw RbtLigandError(_WHERE_, ostr.str()); } } @@ -218,7 +217,7 @@ void RbtHBDConstraint::AddAtomList(RbtModelPtr lig, RbtBool bCheck) { if (bCheck && (m_atomList.size() < counter)) { ostringstream ostr; ostr << "The ligand has only " << m_atomList.size() << " neutral H-bond donor hydrogens(s) (" << counter - << " required)" << ends; + << " required)"; throw RbtLigandError(_WHERE_, ostr.str()); } } @@ -230,7 +229,7 @@ void RbtHBAConstraint::AddAtomList(RbtModelPtr lig, RbtBool bCheck) { if (bCheck && (m_atomList.size() < counter)) { ostringstream ostr; ostr << "The ligand has only " << m_atomList.size() << " neutral H-bond acceptor(s) (" << counter - << " required)" << ends; + << " required)"; throw RbtLigandError(_WHERE_, ostr.str()); } } @@ -239,8 +238,7 @@ void RbtHydroConstraint::AddAtomList(RbtModelPtr lig, RbtBool bCheck) { m_atomList = Rbt::GetAtomList(lig->GetAtomList(), Rbt::isAtomLipophilic()); if (bCheck && (m_atomList.size() < counter)) { ostringstream ostr; - ostr << "The ligand has only " << m_atomList.size() << " hydrophobic atom(s) (" << counter << " required)" - << ends; + ostr << "The ligand has only " << m_atomList.size() << " hydrophobic atom(s) (" << counter << " required)"; throw RbtLigandError(_WHERE_, ostr.str()); } } @@ -251,7 +249,7 @@ void RbtHydroAliphaticConstraint::AddAtomList(RbtModelPtr lig, RbtBool bCheck) { if (bCheck && (m_atomList.size() < counter)) { ostringstream ostr; ostr << "The ligand has only " << m_atomList.size() << " hydrophobic aliphatic atom(s) (" << counter - << " required)" << ends; + << " required)"; throw RbtLigandError(_WHERE_, ostr.str()); } } @@ -262,7 +260,7 @@ void RbtHydroAromaticConstraint::AddAtomList(RbtModelPtr lig, RbtBool bCheck) { if (bCheck && (m_atomList.size() < counter)) { ostringstream ostr; ostr << "The ligand has only " << m_atomList.size() << " hydrophobic aromatic atom(s) (" << counter - << " required)" << ends; + << " required)"; throw RbtLigandError(_WHERE_, ostr.str()); } } @@ -272,7 +270,7 @@ void RbtNegChargeConstraint::AddAtomList(RbtModelPtr lig, RbtBool bCheck) { if (bCheck && (m_atomList.size() < counter)) { ostringstream ostr; ostr << "The ligand has only " << m_atomList.size() << " negatively charged atom(s) (" << counter - << " required)" << ends; + << " required)"; throw RbtLigandError(_WHERE_, ostr.str()); } } @@ -282,7 +280,7 @@ void RbtPosChargeConstraint::AddAtomList(RbtModelPtr lig, RbtBool bCheck) { if (bCheck && (m_atomList.size() < counter)) { ostringstream ostr; ostr << "The ligand has only " << m_atomList.size() << " positively charged atom(s) (" << counter - << " required)" << ends; + << " required)"; throw RbtLigandError(_WHERE_, ostr.str()); } } @@ -299,8 +297,7 @@ void RbtRingAromaticConstraint::AddAtomList(RbtModelPtr lig, RbtBool bCheck) { } if (bCheck && (m_atomList.size() < counter)) { ostringstream ostr; - ostr << "The ligand has only " << m_atomList.size() << " aromatic ring(s) (" << counter << " required)" - << ends; + ostr << "The ligand has only " << m_atomList.size() << " aromatic ring(s) (" << counter << " required)"; throw RbtLigandError(_WHERE_, ostr.str()); } } diff --git a/src/lib/RbtCrdFileSink.cxx b/src/lib/RbtCrdFileSink.cxx index 9d304ff0..828ba4b3 100644 --- a/src/lib/RbtCrdFileSink.cxx +++ b/src/lib/RbtCrdFileSink.cxx @@ -67,7 +67,7 @@ void RbtCrdFileSink::Render() { // 2. Write number of atoms ostringstream ostr; - ostr << setw(5) << spModel->GetNumAtoms() << ends; + ostr << setw(5) << spModel->GetNumAtoms(); AddLine(ostr.str()); // Remember the line number containing the number of atoms // as we'll need to update the total num atoms after each Render when we are in multiconf mode @@ -131,7 +131,7 @@ void RbtCrdFileSink::Render() { ostr << setw(0) << " " << setw(4) << spAtom->GetSubunitId().c_str(); // This subunit ID is unique in the segment ostr.setf(ios_base::right, ios_base::adjustfield); - ostr << setw(10) << 0.0 << ends; + ostr << setw(10) << 0.0; AddLine(ostr.str()); } @@ -139,7 +139,7 @@ void RbtCrdFileSink::Render() { // then write the file without clearing the cache if (GetMultiConf()) { ostringstream ostr; - ostr << setw(5) << m_nAtomId << ends; + ostr << setw(5) << m_nAtomId; ReplaceLine(ostr.str(), m_numAtomsLineRec); Write(false); } else diff --git a/src/lib/RbtElementFileSource.cxx b/src/lib/RbtElementFileSource.cxx index 9c14eedd..6a49e2f5 100644 --- a/src/lib/RbtElementFileSource.cxx +++ b/src/lib/RbtElementFileSource.cxx @@ -11,7 +11,6 @@ ***********************************************************************/ #include -using std::ends; using std::istringstream; using std::ostringstream; @@ -93,7 +92,7 @@ RbtElementData RbtElementFileSource::GetElementData(RbtInt nAtomicNumber) { return (*iter).second; else { ostringstream ostr; - ostr << "Atomic number " << nAtomicNumber << " not found in " << GetFileName() << ends; + ostr << "Atomic number " << nAtomicNumber << " not found in " << GetFileName(); RbtString strError(ostr.str()); throw RbtFileMissingParameter(_WHERE_, strError); } diff --git a/src/lib/RbtFilter.cxx b/src/lib/RbtFilter.cxx index 0e3f2692..9bd78d1f 100644 --- a/src/lib/RbtFilter.cxx +++ b/src/lib/RbtFilter.cxx @@ -11,7 +11,6 @@ ***********************************************************************/ #include -using std::ends; using std::ostringstream; #include "RbtFilter.h" @@ -202,7 +201,7 @@ RbtBool RbtFilter::Terminate() { } else { ostringstream error; error << "Wrong output: " << val; - error << "; Termination filters should return 0,1 or -1" << ends; + error << "; Termination filters should return 0,1 or -1"; throw RbtError(_WHERE_, error.str()); } } else diff --git a/src/lib/RbtMdlFileSink.cxx b/src/lib/RbtMdlFileSink.cxx index f5540656..7483cc1e 100644 --- a/src/lib/RbtMdlFileSink.cxx +++ b/src/lib/RbtMdlFileSink.cxx @@ -71,7 +71,7 @@ void RbtMdlFileSink::Render() { ostr << setw(3) << modelAtomList.size() + solventAtomList.size() << setw(3) << modelBondList.size() + solventBondList.size() << setw(3) << 0 << setw(3) << 0 << setw(3) << 0 << setw(3) << 0 << setw(3) << 0 << setw(3) << 0 << setw(3) << 0 << setw(3) << 0 << setw(3) << 999 - << " V2000" << ends; + << " V2000"; AddLine(ostr.str()); // DM 19 June 2006 - clear the map of logical atom IDs each time @@ -125,8 +125,8 @@ void RbtMdlFileSink::RenderAtomList(const RbtAtomList& atomList) { << setw(3) << 0 // atom stereo parity << setw(3) << 0 // hydrogen count+1 (query CTABs only) << setw(3) << 0 // stereo care box (query CTABs only) - << setw(3) << 0 // valence (0 = no marking) - << ends; // Mass diff, formal charge, stereo parity, num hydrogens, center + << setw(3) << 0; // valence (0 = no marking) + // Mass diff, formal charge, stereo parity, num hydrogens, center AddLine(ostr.str()); } } @@ -147,8 +147,8 @@ void RbtMdlFileSink::RenderBondList(const RbtBondList& bondList) { ostringstream ostr; ostr.setf(ios_base::right, ios_base::adjustfield); ostr << setw(3) << id1 << setw(3) << id2 << setw(3) << spBond->GetFormalBondOrder() << setw(3) << 0 - << setw(3) << 0 << setw(3) << 0 - << ends; // Atom1, Atom2, bond order, stereo designator, unused, topology code + << setw(3) << 0 << setw(3) + << 0; // Atom1, Atom2, bond order, stereo designator, unused, topology code AddLine(ostr.str()); } else { // Should never happen. Probably best to throw an error at this point. diff --git a/src/lib/RbtMdlFileSource.cxx b/src/lib/RbtMdlFileSource.cxx index dfbbdc12..4eaf03ba 100644 --- a/src/lib/RbtMdlFileSource.cxx +++ b/src/lib/RbtMdlFileSource.cxx @@ -113,7 +113,7 @@ void RbtMdlFileSource::Parse() { // Compose the atom name from element+atomID (i.e. C1, N2, C3 etc) nAtomId++; ostringstream ostr; - ostr << strElementName << nAtomId << ends; + ostr << strElementName << nAtomId; RbtString strAtomName(ostr.str()); // Construct a new atom (constructor only accepts the 2D params) @@ -728,7 +728,7 @@ void RbtMdlFileSource::AddHydrogen(RbtAtomPtr spAtom) { // Construct the new hydrogen atom (constructor only accepts the 2D params) RbtInt nAtomId = m_atomList.size() + 1; ostringstream ostr; - ostr << "H" << nAtomId << ends; + ostr << "H" << nAtomId; RbtString strAtomName(ostr.str()); RbtAtomPtr spHAtom(new RbtAtom( nAtomId, @@ -940,7 +940,7 @@ void RbtMdlFileSource::SetupSegmentNames() { nSeg++, seed = Rbt::FindAtom(m_atomList, Rbt::isSegmentName_eq("H"))) { // New segment name (H1, H2 etc) ostringstream ostr; - ostr << "H" << nSeg << ends; + ostr << "H" << nSeg; RbtString strSegName(ostr.str()); // Temporary atom list containing atoms to be processed // Note: this is a true list (not a vector) as we will be making numerous insertions and deletions diff --git a/src/lib/RbtPRMFactory.cxx b/src/lib/RbtPRMFactory.cxx index 533229d3..460ebc0e 100644 --- a/src/lib/RbtPRMFactory.cxx +++ b/src/lib/RbtPRMFactory.cxx @@ -121,7 +121,7 @@ RbtModelPtr RbtPRMFactory::CreateReceptor() { } for (RbtInt i = 1; i <= n; i++) { ostringstream ostr; - ostr << _REC_COORD_FILE << "_" << i << ends; + ostr << _REC_COORD_FILE << "_" << i; RbtString paramName(ostr.str()); RbtString strCoordFile = m_pParamSource->GetParameterValueAsString(paramName); if (m_iTrace > 0) { diff --git a/src/lib/RbtPharmaSF.cxx b/src/lib/RbtPharmaSF.cxx index 7e93ce7d..ccbe7ca6 100644 --- a/src/lib/RbtPharmaSF.cxx +++ b/src/lib/RbtPharmaSF.cxx @@ -189,13 +189,13 @@ void RbtPharmaSF::ScoreMap(RbtStringVariantMap& scoreMap) const { // Store the mandatory constraint scores for (RbtUInt i = 0; i < m_conScores.size(); i++) { ostringstream field; - field << name << ".con_" << i + 1 << ends; + field << name << ".con_" << i + 1; scoreMap[field.str()] = m_conScores[i]; } // Store the optional constraint scores (unsorted) for (RbtUInt i = 0; i < m_optScores.size(); i++) { ostringstream field; - field << name << ".opt_" << i + 1 << ends; + field << name << ".opt_" << i + 1; scoreMap[field.str()] = m_optScores[i]; } } diff --git a/src/lib/RbtPsfFileSink.cxx b/src/lib/RbtPsfFileSink.cxx index 25a21805..aa3d9378 100644 --- a/src/lib/RbtPsfFileSink.cxx +++ b/src/lib/RbtPsfFileSink.cxx @@ -55,7 +55,7 @@ void RbtPsfFileSink::Render() { AddLine(""); RbtStringList titleList(spModel->GetTitleList()); ostringstream ostr; - ostr << setw(8) << titleList.size() << setw(0) << " " << strTitleKey << ends; + ostr << setw(8) << titleList.size() << setw(0) << " " << strTitleKey; AddLine(ostr.str()); for (RbtStringListConstIter iter = titleList.begin(); iter != titleList.end(); iter++) { // Add an initial star if the title does not already commence with a star @@ -68,7 +68,7 @@ void RbtPsfFileSink::Render() { // 2. Write number of atoms ostringstream ostr2; - ostr2 << setw(8) << spModel->GetNumAtoms() << setw(0) << " " << strAtomKey << ends; + ostr2 << setw(8) << spModel->GetNumAtoms() << setw(0) << " " << strAtomKey; AddLine(ostr2.str()); // delete ostr2.str(); @@ -97,7 +97,7 @@ void RbtPsfFileSink::Render() { delete[] line; // 4. Write number of bonds ostringstream ostr3; - ostr3 << setw(8) << spModel->GetNumBonds() << setw(0) << " " << strBondKey << ends; + ostr3 << setw(8) << spModel->GetNumBonds() << setw(0) << " " << strBondKey; AddLine(""); AddLine(ostr3.str()); // delete ostr3.str(); @@ -117,7 +117,7 @@ void RbtPsfFileSink::Render() { bIter++; ostr << setw(8) << (*bIter)->GetAtom1Ptr()->GetAtomId() << setw(8) << (*bIter)->GetAtom2Ptr()->GetAtomId(); bIter++; - ostr << ends; + ostr; AddLine(ostr.str()); } // Remaining bonds on final incomplete line @@ -127,7 +127,7 @@ void RbtPsfFileSink::Render() { ostr << setw(8) << (*bIter)->GetAtom1Ptr()->GetAtomId() << setw(8) << (*bIter)->GetAtom2Ptr()->GetAtomId(); } - ostr << ends; + ostr; AddLine(ostr.str()); }