diff --git a/include/cando/chem/atom.h b/include/cando/chem/atom.h index d312cae6..bf2952e4 100644 --- a/include/cando/chem/atom.h +++ b/include/cando/chem/atom.h @@ -521,23 +521,22 @@ namespace chem { Atom_O() : _UniqueAtomOrder(nextUniqueAtomOrder()), _Alias(nil()), - _Element(element_Undefined), - _Hybridization(hybridization_undefined), - _Type(nil()), - _Flags(0), - _StereochemistryType(undefinedCenter), - _Configuration(undefinedConfiguration), - _Ionization(0), - _Charge(0.0), - _VdwRadius(0.0), - _CovalentRadius(0.0), - _Mask(0), - _CopyAtom(unbound()), - _RingMembershipCount(0), - _TempInt(0) + _Flags(0), + _Type(nil()), + _Charge(0.0), + _CopyAtom(unbound()),_TempInt(0), + _VdwRadius(0.0), + _CovalentRadius(0.0), + _StereochemistryType(undefinedCenter), + _Configuration(undefinedConfiguration), + _Mask(0), + _Element(element_Undefined), + _Hybridization(hybridization_undefined), + _RingMembershipCount(0), + _Ionization(0) // moeIndex(0), // moeType(_Nil()) - {}; + {}; virtual ~Atom_O() {}; }; diff --git a/include/cando/chem/chemInfo.h b/include/cando/chem/chemInfo.h index b65599b2..07112268 100644 --- a/include/cando/chem/chemInfo.h +++ b/include/cando/chem/chemInfo.h @@ -114,7 +114,7 @@ CL_DEFMETHOD chem::Atom_sp tag(core::T_sp tag) { return this->getAtomWithTag */ BoundFrame_sp boundFrame(); - ChemInfoMatch_O(Root_sp root, size_t maxtagPlus1) : _Root(root), _Matches(false), _MaxTagPlus1(maxtagPlus1), _TagHistory(nil()) {}; + ChemInfoMatch_O(Root_sp root, size_t maxtagPlus1) : _Matches(false), _MaxTagPlus1(maxtagPlus1), _Root(root), _TagHistory(nil()) {}; }; @@ -1074,9 +1074,9 @@ class Root_O : public AtomOrBondMatchNode_O virtual ChemInfoType type() { return root; }; virtual bool matches_Atom( Root_sp root, chem::Atom_sp atom ); virtual bool matches_Bond( Root_sp root, chem::Atom_sp from, chem::Bond_sp bond ); - Root_O(const std::string& code, ChemInfoNode_sp node, size_t maxtag) : _Code(code), _Node(node), _Tests(nil()), _MaxTag(maxtag) {} + Root_O(const std::string& code, ChemInfoNode_sp node, size_t maxtag) : _Node(node), _Tests(nil()), _MaxTag(maxtag), _Code(code) {} Root_O(const std::string& code) : _Code(code) {}; - Root_O() : _Code(""), _Node(nil()), _Tests(nil()), _MaxTag(0) {}; + Root_O() : _Node(nil()), _Tests(nil()), _MaxTag(0), _Code("") {}; }; diff --git a/include/cando/chem/chemdraw.h b/include/cando/chem/chemdraw.h index ba56494c..44e8f3d3 100644 --- a/include/cando/chem/chemdraw.h +++ b/include/cando/chem/chemdraw.h @@ -118,13 +118,13 @@ class CDNode_O : public core::CxxObject_O CDNode_O( const CDNode_O& ss ); //!< Copy constructor - CDNode_O() : _Atom(nil()) - , _BackSpan(nil()) - , _NextSpan(nil()) - , _AtomProperties(nil()) - , _ResidueProperties(nil()) - , _MoleculeProperties(nil()) - {}; + CDNode_O() : _AtomProperties(nil()) + , _ResidueProperties(nil()) + , _MoleculeProperties(nil()) + , _Atom(nil()) + , _BackSpan(nil()) + , _NextSpan(nil()) + {}; virtual ~CDNode_O() {}; }; diff --git a/include/cando/chem/constitutionAtoms.h b/include/cando/chem/constitutionAtoms.h index 5f9e2c60..4b8d4a53 100644 --- a/include/cando/chem/constitutionAtoms.h +++ b/include/cando/chem/constitutionAtoms.h @@ -104,7 +104,7 @@ It stores the atom name, element, properties and a vector of bonds in the form o virtual bool isVirtualAtom() { return false;}; /*! Append a ConstitutionBond_sp to our list of bonds */ void addConstitutionBond(ConstitutionBond_sp cb) {this->_Bonds.push_back(cb);}; - ConstitutionAtom_O(MatterName atomName, Element element, core::T_sp atomType, size_t index, StereochemistryType stype, core::List_sp properties ) : _AtomName(atomName), _Element(element), _AtomType(atomType), _Index(index), _StereochemistryType(stype), _Properties(properties) {}; + ConstitutionAtom_O(MatterName atomName, Element element, core::T_sp atomType, size_t index, StereochemistryType stype, core::List_sp properties ) : _AtomName(atomName), _Index(index), _Element(element), _AtomType(atomType), _StereochemistryType(stype), _Properties(properties) {}; ConstitutionAtom_O() : _AtomType(nil()) {}; virtual Atom_sp buildAtom() const; }; diff --git a/include/cando/chem/energyDihedral.h b/include/cando/chem/energyDihedral.h index 30cac404..bad9795b 100644 --- a/include/cando/chem/energyDihedral.h +++ b/include/cando/chem/energyDihedral.h @@ -116,7 +116,7 @@ class EnergyDihedral : public EnergyTerm double getCalculatedDihedralDeviation() { return this->_CalculatedDihedralDeviation;}; public: - EnergyDihedral(Atom_sp a1, Atom_sp a2, Atom_sp a3, Atom_sp a4, double phase, bool proper, size_t i1, size_t i2, size_t i3, size_t i4, double sinp, double cosp, double v, double dn, int in) : term(sinp,cosp,v,dn,in,i1,i2,i3,i4),_Atom1(a1),_Atom2(a2),_Atom3(a3),_Atom4(a4), _PhaseRad(phase), _Proper(proper) {}; + EnergyDihedral(Atom_sp a1, Atom_sp a2, Atom_sp a3, Atom_sp a4, double phase, bool proper, size_t i1, size_t i2, size_t i3, size_t i4, double sinp, double cosp, double v, double dn, int in) : _Proper(proper), _Atom1(a1),_Atom2(a2),_Atom3(a3),_Atom4(a4), _PhaseRad(phase), term(sinp,cosp,v,dn,in,i1,i2,i3,i4) {}; EnergyDihedral() {}; public: adapt::QDomNode_sp asXml(); diff --git a/include/cando/chem/energyNonbond.h b/include/cando/chem/energyNonbond.h index a8a374d9..bd6ea7dd 100644 --- a/include/cando/chem/energyNonbond.h +++ b/include/cando/chem/energyNonbond.h @@ -284,7 +284,7 @@ class EnergyNonbond_O : public EnergyComponent_O public: EnergyNonbond_O( const EnergyNonbond_O& ss ); //!< Copy constructor - EnergyNonbond_O() : _FFNonbondDb(unbound()), _UsesExcludedAtoms(true) {}; + EnergyNonbond_O() : _UsesExcludedAtoms(true), _FFNonbondDb(unbound()) {}; }; }; diff --git a/include/cando/chem/energySketchNonbond.h b/include/cando/chem/energySketchNonbond.h index b4ac1250..32f0f2fb 100644 --- a/include/cando/chem/energySketchNonbond.h +++ b/include/cando/chem/energySketchNonbond.h @@ -154,7 +154,7 @@ class EnergySketchNonbond_O : public EnergyComponent_O void modifySketchNonbondTermConstant(size_t index, float constant); public: - EnergySketchNonbond_O() : _LongDistanceCutoff(80.0), _ScaleSketchNonbond(1.0), _IgnoreHydrogensAndLps(false), _FreezeFlags() {}; + EnergySketchNonbond_O() : _ScaleSketchNonbond(1.0), _LongDistanceCutoff(80.0), _IgnoreHydrogensAndLps(false), _FreezeFlags() {}; void reset(); }; diff --git a/include/cando/chem/ffTypesDb.h b/include/cando/chem/ffTypesDb.h index 5ffe2b02..bc7568b1 100644 --- a/include/cando/chem/ffTypesDb.h +++ b/include/cando/chem/ffTypesDb.h @@ -102,7 +102,6 @@ class FFTypesDb_O : public FFBaseDb_O size_t new_size = other_types_db->_TypeAssignmentRules.size() + this->_TypeAssignmentRules.size(); gctools::Vec0 newRules; newRules.reserve(new_size); - size_t idx; for ( auto it : other_types_db->_TypeAssignmentRules ) { newRules.push_back(it); } diff --git a/include/cando/chem/minimizer.h b/include/cando/chem/minimizer.h index 953ae483..2be88d01 100644 --- a/include/cando/chem/minimizer.h +++ b/include/cando/chem/minimizer.h @@ -325,7 +325,7 @@ takes a single argument, the NVECTOR position of the atoms.)dx"); adapt::QDomNode_sp asXml(); - Minimizer_O() : _PrintIntermediateResults(1), _StepCallback(nil()), _Frozen(nil()) {}; + Minimizer_O() : _PrintIntermediateResults(1), _Frozen(nil()), _StepCallback(nil()) {}; }; extern core::Symbol_sp& _sym__PLUS_minimizerStatusConverter_PLUS_; diff --git a/include/cando/chem/monomer.h b/include/cando/chem/monomer.h index 5b2ffc59..886586a7 100644 --- a/include/cando/chem/monomer.h +++ b/include/cando/chem/monomer.h @@ -113,7 +113,7 @@ namespace chem { CL_DEFMETHOD core::Symbol_sp name() const { return this->_Name; }; CL_DEFMETHOD Fixnum isomer() const { return this->_Isomer; }; CL_DEFMETHOD Topology_sp topology() const { return this->_Topology; }; - Isoname_O(core::Symbol_sp name, Topology_sp topology, Fixnum isomer ) : _Name(name), _Topology(topology), _Isomer(isomer) {}; + Isoname_O(core::Symbol_sp name, Topology_sp topology, Fixnum isomer ) : _Name(name), _Isomer(isomer), _Topology(topology) {}; }; }; diff --git a/include/cando/chem/superposableConformationCollection.h b/include/cando/chem/superposableConformationCollection.h index 89fcfbf9..d69b4a5b 100644 --- a/include/cando/chem/superposableConformationCollection.h +++ b/include/cando/chem/superposableConformationCollection.h @@ -49,7 +49,6 @@ template <> struct to_object, translate::dont_adopt_pointer> { static core::T_sp convert(gctools::SmallOrderedSet atoms) { ql::list res; - int i(0); for (auto ai = atoms.begin(); ai != atoms.end(); ai++) { res << *ai; } diff --git a/src/adapt/mySaxInterface.cc b/src/adapt/mySaxInterface.cc index 3e38f044..5c104c3a 100644 --- a/src/adapt/mySaxInterface.cc +++ b/src/adapt/mySaxInterface.cc @@ -45,10 +45,8 @@ namespace adapt { // string MySaxHandlerDefault::getAttribute(char* str) { - int iCount; const XML_Char **pos; string res; - iCount = 0; pos = this->attributes; while (*pos) { if ( strcmp(*pos,str)==0 ) { diff --git a/src/adapt/objectSet.cc b/src/adapt/objectSet.cc index 37a0e453..cb1497bc 100644 --- a/src/adapt/objectSet.cc +++ b/src/adapt/objectSet.cc @@ -106,7 +106,7 @@ ObjectSet_sp ObjectSet_O::cartesianProduct(ObjectSet_sp b) { ObjectSet_sp nset; stringstream sstr; nset = ObjectSet_O::create(); - this->map([&b, &nset, this](T_sp si) { + this->map([&nset, this](T_sp si) { this->map( [&si,&nset] (T_sp bi) { Cons_sp op = _lisp->create(si,bi); nset->insert(op); @@ -124,7 +124,7 @@ ObjectSet_sp ObjectSet_O::cartesianProductWrapped(ObjectSet_sp b, const ObjectSe stringstream sstr; nset = ObjectSet_O::create(); - this->map([&b, &nset, this, &wrapper](T_sp si) { + this->map([&nset, this, &wrapper](T_sp si) { this->map( [&si,&nset,&wrapper] (T_sp bi) { T_sp op = wrapper(si,bi); nset->insert(op); diff --git a/src/adapt/quickDom.cc b/src/adapt/quickDom.cc index 911dc8ac..1ab36364 100644 --- a/src/adapt/quickDom.cc +++ b/src/adapt/quickDom.cc @@ -202,10 +202,7 @@ void QDomNode_O::throwErrorForChildrenWithoutName(string nm) // Return true if the data is all white space bool QDomNode_O::dataIsAllWhiteSpace() { - bool sawChar; string val; - string::iterator it; - sawChar = false; for (size_t idx = 0; idxcharacters->_Contents->length(); idx++ ) { claspCharacter c = cl__char(this->characters->_Contents,idx).unsafe_character(); if (!isspace(c)) @@ -222,7 +219,6 @@ bool QDomNode_O::dataIsAllWhiteSpace() int QDomNode_O::dataCountNewLines() { string val; - string::iterator it; int newLines; newLines = 0; for (size_t idx = 0; idxcharacters->_Contents->length(); idx++ ) { diff --git a/src/chem/aggregate.cc b/src/chem/aggregate.cc index 85202feb..e7548dfc 100644 --- a/src/chem/aggregate.cc +++ b/src/chem/aggregate.cc @@ -566,13 +566,11 @@ CL_DEFMETHOD core::List_sp Aggregate_O::atomsWithChimeraSpecifications(const str mol = gc::As(*mi); // printf("%s:%d mol->getName()= %s matches chainSym[%s] = %d\n", __FILE__, __LINE__, _rep_(mol->getName()).c_str(),_rep_(chainSym).c_str(), mol->getName()==chainSym); if ( mol->getName() == chainSym ) { - bool foundResidue = false; for ( ri = mol->begin_residues(); ri!=mol->end_residues(); ri++ ) { res = (*ri).as(); // printf("%s:%d res->getFileSequenceNumber()= %d matches fileSequenceNumber[%d] = %d\n", __FILE__, __LINE__, res->getFileSequenceNumber(), fileSequenceNumber, res->getFileSequenceNumber()==fileSequenceNumber); // printf("%s:%d res->getId() = %d\n", __FILE__, __LINE__, res->getId()); if ( res->getFileSequenceNumber() == fileSequenceNumber ) { - foundResidue = true; // printf("%s:%d res->hasAtomWithName(%s) = %d\n", __FILE__, __LINE__, _rep_(atomSym).c_str(), res->hasAtomWithName(atomSym)); if ( res->hasAtomWithName(atomSym) ) { core::T_mv atom_mv = res->atomWithName(atomSym); diff --git a/src/chem/atom.cc b/src/chem/atom.cc index 03987f6a..56e2934c 100644 --- a/src/chem/atom.cc +++ b/src/chem/atom.cc @@ -1208,7 +1208,6 @@ Matter_sp Atom_O::copy(core::T_sp new_to_old) Matter_sp Atom_O::copyDontRedirectAtoms(core::T_sp new_to_old) { LOG("Copying atom @%p" , this ); - Atom_sp myself = this->sharedThis(); auto aNew = gctools::GC::copy( *this); // = RP_Copy(this); aNew->_Bonds.clear(); this->_CopyAtom = aNew; diff --git a/src/chem/atomIdMap.cc b/src/chem/atomIdMap.cc index 71a7c32b..55762002 100644 --- a/src/chem/atomIdMap.cc +++ b/src/chem/atomIdMap.cc @@ -138,7 +138,6 @@ CL_DEFMETHOD void AtomIdMap_O::resizeResidue(int mol, int res, int numAtoms) core::ComplexVector_T_sp residues = gc::As(this->_AtomIdMap->rowMajorAref(mol)); if (reslength()) { core::ComplexVector_T_sp atoms = gc::As(residues->rowMajorAref(res)); - size_t oldNumAtoms = atoms->length(); atoms->resize(numAtoms); return; } diff --git a/src/chem/bond.cc b/src/chem/bond.cc index e24d940f..64af63b5 100644 --- a/src/chem/bond.cc +++ b/src/chem/bond.cc @@ -155,7 +155,6 @@ void Bond_O::addYourselfToCopiedAtoms() // bool Bond_O::isInterResidueBond(core::HashTable_sp atomToResidue) { - Atom_sp a1 = this->_Atom1; core::T_sp res1 = atomToResidue->gethash(this->_Atom1); core::T_sp res2 = atomToResidue->gethash(this->_Atom2); return (res1!=res2); diff --git a/src/chem/chemInfo.cc b/src/chem/chemInfo.cc index 03193378..8f7a5cee 100644 --- a/src/chem/chemInfo.cc +++ b/src/chem/chemInfo.cc @@ -2269,8 +2269,6 @@ bool Root_O::matches_Atom(Root_sp root, chem::Atom_sp atom) { LOG("%s\natom: %s", this->asSmarts(), _rep_(atom)); chem::BondList_sp nextBonds; - bool matches; - matches = false; if (this->_Node.notnilp()) { CI_LOG(("%s:%d:%s Entering\n", __FILE__, __LINE__, __FUNCTION__)); LOG("_Node is notNil - testing"); @@ -2306,8 +2304,6 @@ bool SmartsRoot_O::matches_Atom(Root_sp root, chem::Atom_sp atom) { LOG("%s\natom: %s", this->asSmarts(), _rep_(atom)); chem::BondList_sp nextBonds; - bool matches; - matches = false; if (!this->Root_O::matches_Atom(root, atom)) goto FAIL; // SUCCESS: @@ -2353,8 +2349,6 @@ bool AntechamberRoot_O::matches_Atom(Root_sp root, chem::Atom_sp atom) { LOG("%s\natom: %s", this->asSmarts(), _rep_(atom)); chem::BondList_sp nextBonds; - bool matches; - matches = false; if (!this->Base::matches_Atom(root, atom)) { goto FAIL; } @@ -2831,7 +2825,6 @@ void ChemInfoGraph_O::buildFromRoot_() { core::write_bf_stream(fmt::sprintf("Converting AtomTest to chem-info-graph nodes head: %s\n", _rep_(atomTest))); } graph->_nodes_to_index->setf_gethash(atomTest, core::make_fixnum(graph->_atomNodes.size())); - size_t node_index = graph->_atomNodes.size(); graph->_atomNodes.push_back(atomTest); return true; } else if (parentOrNil.nilp() && gc::IsA(node)) { @@ -2840,7 +2833,6 @@ void ChemInfoGraph_O::buildFromRoot_() { core::write_bf_stream(fmt::sprintf("Converting logical to chem-info-graph nodes head: %s\n", _rep_(logical))); } graph->_nodes_to_index->setf_gethash(logical, core::make_fixnum(graph->_atomNodes.size())); - size_t node_index = graph->_atomNodes.size(); graph->_atomNodes.push_back(logical); return true; } else { @@ -2854,7 +2846,7 @@ void ChemInfoGraph_O::buildFromRoot_() { // This is tricky code core::HashTableEq_sp parent_nodes = core::HashTableEq_O::create_default(); walk_nodes_with_parent( - nil(), pattern->_Node, [&graph, &parent_nodes, &closers](core::T_sp parentOrNil, ChemInfoNode_sp node) { + nil(), pattern->_Node, [&graph, &parent_nodes](core::T_sp parentOrNil, ChemInfoNode_sp node) { if (chem__verbose(2)) { core::write_bf_stream(fmt::sprintf("Walking pattern parent: %s node: %s\n", _rep_(parentOrNil), _rep_(node))); } @@ -3241,8 +3233,8 @@ struct print_callback { this->_results->vectorPushExtend(core::make_fixnum(get(correspondence_map_1_to_2, vertex1))); } } - core::T_sp bres = core::eval::funcall(this->m_callback, this->_results, core::make_fixnum((*this->_count_callbacks)), - this->m_graph1, this->m_graph2); + core::eval::funcall(this->m_callback, this->_results, core::make_fixnum((*this->_count_callbacks)), + this->m_graph1, this->m_graph2); } if (this->_count_callbacks != NULL) { (*this->_count_callbacks)++; diff --git a/src/chem/chemdraw.cc b/src/chem/chemdraw.cc index 6f2a0f8b..cd01f6ba 100644 --- a/src/chem/chemdraw.cc +++ b/src/chem/chemdraw.cc @@ -520,10 +520,8 @@ core::Symbol_mv parse_property(core::T_sp stream, const string& propertyValue, C bool CDFragment_O::interpret(bool verbose, bool addHydrogens) { // printf("%s:%d Interpreting a fragment\n", __FILE__, __LINE__ ); - int nextFragmentNameIndex = 1; if ( this->_Bonds.size() == 0 ) {return false;} CDBonds::iterator bi; - bool foundHashedBond = false; core::MultipleValues &values = core::lisp_multipleValues(); // adapt::SymbolSet_sp allNames = adapt::SymbolSet_O::create(); { diff --git a/src/chem/complexRestraints.cc b/src/chem/complexRestraints.cc index a93c7218..dda46a37 100644 --- a/src/chem/complexRestraints.cc +++ b/src/chem/complexRestraints.cc @@ -289,12 +289,12 @@ void RestrainedExoCyclicAtom_O::archiveBase(core::ArchiveP node) SIMPLE_ERROR(("In residue(%s) the atom with name(%s) is not exo-cyclic to a six-membered ring") , residue->description() , _rep_(this->_ExoCyclicAtomName) ); } ChemInfoMatch_sp match = gc::As(values.second(match_mv.number_of_values())); - Atom_sp a1 = match->tag(core::make_fixnum(1)); - Atom_sp a2 = match->tag(core::make_fixnum(2)); - Atom_sp a3 = match->tag(core::make_fixnum(3)); - Atom_sp a4 = match->tag(core::make_fixnum(4)); - Atom_sp a5 = match->tag(core::make_fixnum(5)); - Atom_sp a6 = match->tag(core::make_fixnum(6)); + match->tag(core::make_fixnum(1)); + match->tag(core::make_fixnum(2)); + match->tag(core::make_fixnum(3)); + match->tag(core::make_fixnum(4)); + match->tag(core::make_fixnum(5)); + match->tag(core::make_fixnum(6)); FIX_ME(); // is the above correct? } diff --git a/src/chem/conformationCollection.cc b/src/chem/conformationCollection.cc index a363a9ab..ee54922d 100644 --- a/src/chem/conformationCollection.cc +++ b/src/chem/conformationCollection.cc @@ -107,7 +107,6 @@ gctools::SmallOrderedSet::iterator ai; CL_DEFMETHOD void ConformationCollectionEntry_O::extractCoordinatesFromMatter(Matter_sp matter) { ConformationCollection_sp sl; -vector::iterator ci; #ifdef DEBUG_ConformationCollectionEntry this->_Status->addMessage("extractCoordinatesFromMatter"); #endif @@ -293,7 +292,6 @@ Matter_sp matter; ConformationCollection_O::entryIterator si; ConformationCollectionEntry_sp entry; geom::SimpleVectorCoordinate_sp superposeCoords; -geom::SimpleVectorCoordinate_O::iterator ci; frames = geom::FrameList_O::create(); matter = this->getMatter(); for ( si=this->begin_Entries(); si!=this->end_Entries(); si++ ) diff --git a/src/chem/conformationExplorer.cc b/src/chem/conformationExplorer.cc index 028456f9..c4851b0c 100644 --- a/src/chem/conformationExplorer.cc +++ b/src/chem/conformationExplorer.cc @@ -280,7 +280,6 @@ CL_LISPIFY_NAME("extractCoordinatesFromMatter"); CL_DEFMETHOD void ConformationExplorerEntryStage_O::extractCoordinatesFromMatter(Matter_sp matter) { ConformationExplorer_sp sl; - geom::SimpleVectorCoordinate_O::iterator ci; LOG("About to get ConformationExplorer" ); sl = this->getConformationExplorer(); LOG("Got ConformationExplorer" ); @@ -853,8 +852,6 @@ CL_DEFMETHOD ConformationExplorerEntry_sp ConformationExplorer_O::createEntr bool ConformationExplorer_O::hasStageNameInAllEntries(core::T_sp stageKey) { entryIterator ei; - bool inAll; - inAll = false; for ( ei=this->begin_Entries(); ei!=this->end_Entries(); ei++ ) { if ( !(*ei)->hasEntryStageWithName(stageKey) ) diff --git a/src/chem/constitution.cc b/src/chem/constitution.cc index d613010e..e88da57b 100644 --- a/src/chem/constitution.cc +++ b/src/chem/constitution.cc @@ -122,7 +122,6 @@ void Constitution_O::makeResidueConsistentWithStereoisomerNamed(Residue_sp res, string atomName; Atom_sp aa; core::T_sp bdb = getCandoDatabase(); - Constitution_sp residueConstitution = this->asSmartPtr(); core::Symbol_sp fullName = gc::As(core::eval::funcall(_sym_monomerNameForNameOrPdb,bdb,stereoisomerName)); core::Symbol_sp pdbName = gc::As(core::eval::funcall(_sym_pdbNameForNameOrPdb,bdb,stereoisomerName)); res->setName(fullName); diff --git a/src/chem/constitutionAtoms.cc b/src/chem/constitutionAtoms.cc index 9f121ade..2fe977eb 100644 --- a/src/chem/constitutionAtoms.cc +++ b/src/chem/constitutionAtoms.cc @@ -162,7 +162,6 @@ CL_DEFUN ConstitutionAtoms_sp ConstitutionAtoms_O::makeConstitutionAtomsFromResi void ConstitutionAtoms_O::addConstitutionVirtualAtom(ConstitutionVirtualAtom_sp ca) { - ConstitutionAtomIndex0N nextIndex = this->_Atoms.size(); this->_Atoms.push_back(ca); }; diff --git a/src/chem/energyAnchorRestraint.cc b/src/chem/energyAnchorRestraint.cc index b936a18c..0366c313 100644 --- a/src/chem/energyAnchorRestraint.cc +++ b/src/chem/energyAnchorRestraint.cc @@ -146,7 +146,7 @@ double _evaluateEnergyOnly_AnchorRestraint( #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop #include @@ -214,7 +214,8 @@ bool calcOffDiagonalHessian = true; { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop ; @@ -276,7 +277,7 @@ double EnergyAnchorRestraint_O::evaluateAllComponent( ScoringFunction_sp score, { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop double x1,y1,z1,xa,ya,za,ka; @@ -365,7 +366,8 @@ bool calcOffDiagonalHessian = true; { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop double x1,y1,z1,xa,ya,za,ka; @@ -434,7 +436,7 @@ int fails = 0; { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop double x1,y1,z1,xa,ya,za,ka; diff --git a/src/chem/energyAngle.cc b/src/chem/energyAngle.cc index f0888078..f6e2d8ca 100644 --- a/src/chem/energyAngle.cc +++ b/src/chem/energyAngle.cc @@ -209,9 +209,10 @@ double _evaluateEnergyOnly_Angle( #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include -#pragma clang diagnostic pop + #if !USE_EXPLICIT_DECLARES double fx1; double fy1; @@ -227,7 +228,8 @@ double _evaluateEnergyOnly_Angle( fx2 = 0.0; fy2 = 0.0; fz2 = 0.0; fx3 = 0.0; fy3 = 0.0; fz3 = 0.0; #include - +#pragma clang diagnostic pop + return Energy; } @@ -306,9 +308,9 @@ bool calcOffDiagonalHessian = true; { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include -#pragma clang diagnostic pop fx1 = 0.0; fy1 = 0.0; fz1 = 0.0; fx2 = 0.0; fy2 = 0.0; fz2 = 0.0; fx3 = 0.0; fy3 = 0.0; fz3 = 0.0; @@ -318,6 +320,7 @@ bool calcOffDiagonalHessian = true; ai!=this->_Terms.end(); ai++ ) { #include +#pragma clang diagnostic pop } } @@ -378,7 +381,7 @@ double EnergyAngle_O::evaluateAllComponent( ScoringFunction_sp score, { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop fx1 = 0.0; fy1 = 0.0; fz1 = 0.0; @@ -501,9 +504,9 @@ bool calcOffDiagonalHessian = true; { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include -#pragma clang diagnostic pop fx1 = 0.0; fy1 = 0.0; fz1 = 0.0; fx2 = 0.0; fy2 = 0.0; fz2 = 0.0; fx3 = 0.0; fy3 = 0.0; fz3 = 0.0; @@ -537,6 +540,7 @@ bool calcOffDiagonalHessian = true; LOG("z3 = %le" , z3 ); int index = i; #include +#pragma clang diagnostic pop } } @@ -551,7 +555,6 @@ SYMBOL_EXPORT_SC_(KeywordPkg,angle_deviation); core::List_sp EnergyAngle_O::checkForBeyondThresholdInteractionsWithPosition(chem::NVector_sp pos, double threshold) { ql::list result; - int fails = 0; #if 0 bool calcForce = false; bool calcDiagonalHessian = false; @@ -582,9 +585,9 @@ core::List_sp EnergyAngle_O::checkForBeyondThresholdInteractionsWithPosition(che { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include -#pragma clang diagnostic pop fx1 = 0.0; fy1 = 0.0; fz1 = 0.0; fx2 = 0.0; fy2 = 0.0; fz2 = 0.0; fx3 = 0.0; fy3 = 0.0; fz3 = 0.0; @@ -610,6 +613,7 @@ core::List_sp EnergyAngle_O::checkForBeyondThresholdInteractionsWithPosition(che } } return result.cons(); +#pragma clang diagnostic pop } @@ -726,9 +730,6 @@ core::List_sp EnergyAngle_O::lookupAngleTerms(AtomTable_sp atomTable, Atom_sp a1 if (!tia1.fixnump()) SIMPLE_ERROR(("Could not find %s in energy function") , _rep_(a1)); if (!tia2.fixnump()) SIMPLE_ERROR(("Could not find %s in energy function") , _rep_(a2)); if (!tia3.fixnump()) SIMPLE_ERROR(("Could not find %s in energy function") , _rep_(a3)); - int ia1 = tia1.unsafe_fixnum(); - int ia2 = tia2.unsafe_fixnum(); - int ia3 = tia3.unsafe_fixnum(); for (auto edi=this->_Terms.begin();edi!=this->_Terms.end();edi++) { if ((edi->_Atom1==a1 && edi->_Atom2==a2 && diff --git a/src/chem/energyAtomTable.cc b/src/chem/energyAtomTable.cc index 9c05b2fe..49d367a5 100644 --- a/src/chem/energyAtomTable.cc +++ b/src/chem/energyAtomTable.cc @@ -624,7 +624,7 @@ CL_DEFMETHOD void AtomTable_O::fill_atom_table_from_vectors(core::List_sp vecto // printf("%s:%d About to set _AtomName with %s\n", __FILE__, __LINE__, _rep_(atom_name_vec->rowMajorAref(i)).c_str()); Atom_sp atom = gc::As(atoms_vec->rowMajorAref(i)); this->_AtomTableIndices->setf_gethash(atom,core::clasp_make_fixnum(i)); - core::T_sp type = atom_type_vec->rowMajorAref(i); +// core::T_sp type = atom_type_vec->rowMajorAref(i); // printf("%s:%d type -> %s\n", __FILE__, __LINE__, _rep_(type).c_str()); atom->setType(atom_type_vec->rowMajorAref(i)); double charge = translate::from_object(charge_vec->rowMajorAref(i))._v; // charge-vector diff --git a/src/chem/energyChiralRestraint.cc b/src/chem/energyChiralRestraint.cc index 24779dd1..4221aa4a 100644 --- a/src/chem/energyChiralRestraint.cc +++ b/src/chem/energyChiralRestraint.cc @@ -95,7 +95,7 @@ double _evaluateEnergyOnly_ChiralRestraint( #undef CHIRAL_RESTRAINT_CALC_FORCE // Don't calculate FORCE or HESSIAN #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop #include @@ -193,11 +193,12 @@ bool calcOffDiagonalHessian = true; { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop double x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4,K, CO; - int I1, I2, I3, I4, i; + int I1, I2, I3, I4; for ( gctools::Vec0::iterator cri=this->_Terms.begin(); cri!=this->_Terms.end(); cri++ ) { #include @@ -265,7 +266,7 @@ double EnergyChiralRestraint_O::evaluateAllComponent( ScoringFunction_sp score, { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop double x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4,K, CO; @@ -396,7 +397,8 @@ bool calcOffDiagonalHessian = true; { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop double x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4,K, CO; @@ -464,7 +466,7 @@ int fails = 0; { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop double x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4,K, CO; diff --git a/src/chem/energyDihedral.cc b/src/chem/energyDihedral.cc index 1db790d8..f4eb5db7 100644 --- a/src/chem/energyDihedral.cc +++ b/src/chem/energyDihedral.cc @@ -288,7 +288,8 @@ double _evaluateEnergyOnly_Dihedral( #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop fx1 = 0.0; fy1 = 0.0; fz1 = 0.0; @@ -378,10 +379,6 @@ core::List_sp EnergyDihedral_O::lookupDihedralTerms(AtomTable_sp atomTable, Atom if (!tia2.fixnump()) SIMPLE_ERROR(("Could not find %s in energy function") , _rep_(a2)); if (!tia3.fixnump()) SIMPLE_ERROR(("Could not find %s in energy function") , _rep_(a3)); if (!tia4.fixnump()) SIMPLE_ERROR(("Could not find %s in energy function") , _rep_(a4)); - int ia1 = tia1.unsafe_fixnum(); - int ia2 = tia2.unsafe_fixnum(); - int ia3 = tia3.unsafe_fixnum(); - int ia4 = tia4.unsafe_fixnum(); for (edi=this->_Terms.begin();edi!=this->_Terms.end();edi++) { if ((edi->_Atom1==a1 && edi->_Atom2==a2 && @@ -442,7 +439,8 @@ void EnergyDihedral_O::setupHessianPreconditioner( #define DIHEDRAL_CALC_OFF_DIAGONAL_HESSIAN { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop fx1 = 0.0; fy1 = 0.0; fz1 = 0.0; @@ -513,7 +511,7 @@ double EnergyDihedral_O::evaluateAllComponent( ScoringFunction_sp score, #define DIHEDRAL_OFF_DIAGONAL_HESSIAN_ACCUMULATE OffDiagHessAcc #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop fx1 = 0.0; fy1 = 0.0; fz1 = 0.0; @@ -654,7 +652,8 @@ void EnergyDihedral_O::compareAnalyticalAndNumericalForceAndHessianTermByTerm( { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop fx1 = 0.0; fy1 = 0.0; fz1 = 0.0; diff --git a/src/chem/energyDihedralRestraint.cc b/src/chem/energyDihedralRestraint.cc index 331d72e2..4ba7a966 100644 --- a/src/chem/energyDihedralRestraint.cc +++ b/src/chem/energyDihedralRestraint.cc @@ -103,7 +103,7 @@ bool RestraintActive; #undef IMPROPER_RESTRAINT_CALC_FORCE // Don't calculate FORCE or HESSIAN #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop #include @@ -200,7 +200,8 @@ bool calcOffDiagonalHessian = true; { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop double x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4; @@ -269,7 +270,7 @@ double EnergyDihedralRestraint_O::evaluateAllComponent( ScoringFunction_sp score { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop double x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4; @@ -442,7 +443,8 @@ void EnergyDihedralRestraint_O::compareAnalyticalAndNumericalForceAndHessianTerm { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop double x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4; @@ -499,7 +501,8 @@ int EnergyDihedralRestraint_O::checkForBeyondThresholdInteractions( { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop double x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4; diff --git a/src/chem/energyFixedNonbond.cc b/src/chem/energyFixedNonbond.cc index 3390ee70..91ceac6f 100644 --- a/src/chem/energyFixedNonbond.cc +++ b/src/chem/energyFixedNonbond.cc @@ -85,7 +85,7 @@ double _evaluateEnergyOnly_FixedNonbond( #undef FNONBOND_CALC_FORCE // Don't calculate FORCE or HESSIAN #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop #include @@ -305,7 +305,8 @@ double EnergyFixedNonbondRestraint_O::evaluateAllComponent( ScoringFunction_sp s { LOG("FixedNonbond component is enabled" ); #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop double x1,y1,z1,xf,yf,zf, dQ1Q2; @@ -432,7 +433,7 @@ bool calcOffDiagonalHessian = true; { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop double x1,y1,z1,x2,y2,z2,dA,dC,dQ1Q2; @@ -485,7 +486,7 @@ int fails = 0; { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop double x1,y1,z1,xf,yf,zf,dQ1Q2; diff --git a/src/chem/energyFunction.cc b/src/chem/energyFunction.cc index 6714b397..5f1b67e8 100644 --- a/src/chem/energyFunction.cc +++ b/src/chem/energyFunction.cc @@ -732,12 +732,10 @@ core::List_sp EnergyFunction_O::checkForBeyondThresholdInteractions(double thres { NVector_sp pos; stringstream info; - int fails = 0; info.str(""); pos = NVector_O::create(this->getNVectorSize()); this->loadCoordinatesIntoVector(pos); - fails = 0; ql::list result; result & this->_Stretch->checkForBeyondThresholdInteractionsWithPosition(pos,threshold); result & this->_Angle->checkForBeyondThresholdInteractionsWithPosition(pos,threshold); @@ -1403,11 +1401,10 @@ CL_DEFMETHOD void EnergyFunction_O::generateStandardEnergyFunctionTables(Matter_ Loop loop; Atom_sp a1, a2, a3, a4, aImproperCenter; core::Symbol_sp t1, t2, t3, t4, t141, t144; - EnergyAtom *eaCenter, *ea1, *ea2, *ea3, *ea4; + EnergyAtom *ea1, *ea2, *ea3, *ea4; FFPtor_sp ffPtor; FFItor_sp ffItor; FFNonbond_sp ffNonbond1, ffNonbond2; - int coordinateIndex; // // Define a Nonbond cross term table @@ -1427,7 +1424,6 @@ CL_DEFMETHOD void EnergyFunction_O::generateStandardEnergyFunctionTables(Matter_ // ALL_ENERGY_COMPONENTS(initialize()); this->_eraseMissingParameters(); - coordinateIndex = 0; ASSERTNOTNULL(forceField); // Search the stretch terms { @@ -1686,7 +1682,6 @@ CL_DEFMETHOD void EnergyFunction_O::generateRestraintEnergyFunctionTables(Matter FFPtor_sp ffPtor; FFItor_sp ffItor; FFNonbond_sp ffNonbond1, ffNonbond2; - int coordinateIndex; if (chem__verbose(1)) core::write_bf_stream(fmt::sprintf("In generateRestraintEnergyFunctionTables\n")); // @@ -1991,14 +1986,8 @@ EnergyAtom* EnergyFunction_O::getEnergyAtomPointer(Atom_sp a) void EnergyFunction_O::dealWithProblem(core::Symbol_sp problem, core::T_sp error_args) { - core::List_sp atoms = nil(); - if ( error_args.consp() && CONS_CAR(error_args) == kw::_sym_atoms ) { - atoms = atoms; - } - for ( auto cur : atoms ) { - Atom_sp a = gctools::As(oCar(cur)); - a->bumpPosition(0.1); - } + // FIXME? Nothing seems to call this function, but it was buggy and doing + // nothing, so I (Bike) deleted it. } diff --git a/src/chem/energyNonbond.cc b/src/chem/energyNonbond.cc index 0a3421f3..5b251da7 100644 --- a/src/chem/energyNonbond.cc +++ b/src/chem/energyNonbond.cc @@ -55,8 +55,6 @@ This is an open source license for the CANDO software from Temple University, bu #define DEBUG_NONBOND_TERM 1 -#define LOG_ENERGY(...) -//#define LOG_ENERGY core::write_bf_stream namespace chem { @@ -193,7 +191,7 @@ double _evaluateEnergyOnly_Nonbond(ScoringFunction_sp score, #undef NONBOND_CALC_FORCE // Don't calculate FORCE or HESSIAN #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop #include @@ -336,8 +334,9 @@ void EnergyNonbond_O::evaluateTerms(ScoringFunction_sp score, { LOG("Nonbond component is enabled" ); #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" - +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" + #include #pragma clang diagnostic pop @@ -435,8 +434,7 @@ void EnergyNonbond_O::evaluateUsingExcludedAtoms(ScoringFunction_sp score, } core::SimpleVector_int32_t_sp numberOfExcludedAtoms = this->_NumberOfExcludedAtomIndices; core::SimpleVector_int32_t_sp excludedAtomIndices = this->_ExcludedAtomIndices; - double vdwScale = this->getVdwScale(); - double electrostaticScale = this->getElectrostaticScale()*ELECTROSTATIC_MODIFIER/this->getDielectricConstant(); +// double electrostaticScale = this->getElectrostaticScale()*ELECTROSTATIC_MODIFIER/this->getDielectricConstant(); // printf("%s:%d electrostaticcharge %lf\n", __FILE__, __LINE__, electrostaticScale ); bool hasForce = force.notnilp(); bool hasHessian = hessian.notnilp(); @@ -465,11 +463,12 @@ void EnergyNonbond_O::evaluateUsingExcludedAtoms(ScoringFunction_sp score, // arrays so that only one thread updates each element at a time. LOG("Nonbond component is enabled" ); #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop // printf("%s:%d:%s Entering\n", __FILE__, __LINE__, __FUNCTION__ ); - double x1,y1,z1,x2,y2,z2,dA,dC,dQ1Q2,dA_old,dC_old,dQ1Q2_old; + double x1,y1,z1,x2,y2,z2,dA,dC,dQ1Q2; int I1, I2; int i = 0; int endIndex = pos->length()/3; @@ -490,7 +489,7 @@ void EnergyNonbond_O::evaluateUsingExcludedAtoms(ScoringFunction_sp score, bool has_excluded_atoms = ((*excludedAtomIndices)[excludedAtomIndex] >= 0); int numberOfExcludedAtomsRemaining = numberOfExcludedAtoms->operator[](index1); double charge11 = (*this->_charge_vector)[index1]; - double electrostatic_scaled_charge11 = charge11*electrostaticScale; +// double electrostatic_scaled_charge11 = charge11*electrostaticScale; for ( int index2 = index1+1, index2_end(endIndex); index2 < index2_end; ++index2 ) { int maybe_excluded_atom = (*excludedAtomIndices)[excludedAtomIndex]; // state TOP-INNER @@ -612,11 +611,9 @@ CL_DEFMETHOD void EnergyNonbond_O::expandExcludedAtomsToTerms() } core::SimpleVector_int32_t_sp numberOfExcludedAtoms = this->_NumberOfExcludedAtomIndices; core::SimpleVector_int32_t_sp excludedAtomIndices = this->_ExcludedAtomIndices; - double vdwScale = this->getVdwScale(); - double electrostaticScale = this->getElectrostaticScale()*ELECTROSTATIC_MODIFIER/this->getDielectricConstant(); LOG("Nonbond component is enabled" ); // printf("%s:%d:%s Entering\n", __FILE__, __LINE__, __FUNCTION__ ); - double x1,y1,z1,x2,y2,z2,dA,dC,dQ1Q2,dA_old,dC_old,dQ1Q2_old; + double dA,dC; int I1, I2; int i = 0; // int endIndex = pos->length()/3; @@ -671,7 +668,6 @@ CL_DEFMETHOD void EnergyNonbond_O::expandExcludedAtomsToTerms() bool has_excluded_atoms = ((*excludedAtomIndices)[excludedAtomIndex] >= 0); int numberOfExcludedAtomsRemaining = numberOfExcludedAtoms->operator[](index1); double charge11 = (*this->_charge_vector)[index1]; - double electrostatic_scaled_charge11 = charge11*electrostaticScale; for ( int index2 = index1+1, index2_end(endIndex); index2 < index2_end; ++index2 ) { LOG(" --- top of inner loop numberOfExcludedAtomsRemaining -> %d index2 -> %d\n" , numberOfExcludedAtomsRemaining , index2 ); int maybe_excluded_atom = (*excludedAtomIndices)[excludedAtomIndex]; @@ -804,9 +800,9 @@ void EnergyNonbond_O::compareAnalyticalAndNumericalForceAndHessianTermByTerm(Sco { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include -#pragma clang diagnostic pop double x1,y1,z1,x2,y2,z2,dA,dC,dQ1Q2; int I1, I2,i; gctools::Vec0::iterator nbi; @@ -817,7 +813,7 @@ void EnergyNonbond_O::compareAnalyticalAndNumericalForceAndHessianTermByTerm(Sco #define ENERGY_FUNCTION score #include #undef ENERGY_FUNCTION - +#pragma clang diagnostic pop } } } diff --git a/src/chem/energyOutOfZPlane.cc b/src/chem/energyOutOfZPlane.cc index 6d6b60ad..998269e3 100644 --- a/src/chem/energyOutOfZPlane.cc +++ b/src/chem/energyOutOfZPlane.cc @@ -88,7 +88,7 @@ double _evaluateEnergyOnly_Oozp( #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop #include @@ -175,15 +175,16 @@ bool calcOffDiagonalHessian = true; { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include -#pragma clang diagnostic pop ; double x1,y1,z1,za,kb; int I1; for ( gctools::Vec0::iterator cri=this->_Terms.begin(); cri!=this->_Terms.end(); cri++ ) { #include +#pragma clang diagnostic pop } } @@ -209,8 +210,6 @@ double EnergyOutOfZPlane_O::evaluateAllComponent( ScoringFunction_sp score, { this->_Evaluations++; bool hasForce = force.notnilp(); - bool hasHessian = hessian.notnilp(); - bool hasHdAndD = (hdvec.notnilp())&&(dvec.notnilp()); // // Copy from implementAmberFunction::evaluateAll // @@ -235,7 +234,7 @@ double EnergyOutOfZPlane_O::evaluateAllComponent( ScoringFunction_sp score, #define OOZP_OFF_DIAGONAL_HESSIAN_ACCUMULATE OffDiagHessAcc #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop @@ -319,7 +318,8 @@ bool calcOffDiagonalHessian = true; { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop double x1,y1,z1,za,kb; @@ -387,7 +387,7 @@ int fails = 0; { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop double x1,y1,z1,za,kb; diff --git a/src/chem/energyPeriodicBoundaryConditionsNonbond.cc b/src/chem/energyPeriodicBoundaryConditionsNonbond.cc index f50912a3..26d91d98 100644 --- a/src/chem/energyPeriodicBoundaryConditionsNonbond.cc +++ b/src/chem/energyPeriodicBoundaryConditionsNonbond.cc @@ -57,8 +57,6 @@ This is an open source license for the CANDO software from Temple University, bu if ((deltasquared)>this->_NonbondCutoffSquared) goto DONE; //#define DEBUG_NONBOND_TERM 1 -#define LOG_ENERGY(x) -//#define LOG_ENERGY core::write_bf_stream namespace chem { @@ -119,7 +117,8 @@ double _evaluateEnergyOnly_PeriodicBoundaryConditionsNonbond(ScoringFunction_sp #undef NONBOND_CALC_FORCE // Don't calculate FORCE or HESSIAN #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop #include @@ -163,9 +162,6 @@ void EnergyPeriodicBoundaryConditionsNonbond_O::evaluateTerms(ScoringFunction_sp double x_width = energyFunction->boundingBox()->get_x_width(); double y_width = energyFunction->boundingBox()->get_y_width(); double z_width = energyFunction->boundingBox()->get_z_width(); - double half_x_size = x_width*0.5; - double half_y_size = y_width*0.5; - double half_z_size = z_width*0.5; #define NONBOND_CALC_FORCE #define NONBOND_CALC_DIAGONAL_HESSIAN @@ -195,8 +191,9 @@ void EnergyPeriodicBoundaryConditionsNonbond_O::evaluateTerms(ScoringFunction_sp { LOG("Nonbond component is enabled" ); #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" - +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" + #include #pragma clang diagnostic pop @@ -298,7 +295,6 @@ void EnergyPeriodicBoundaryConditionsNonbond_O::evaluateUsingExcludedAtoms(Scori } core::SimpleVector_int32_t_sp numberOfExcludedAtoms = this->_NumberOfExcludedAtomIndices; core::SimpleVector_int32_t_sp excludedAtomIndices = this->_ExcludedAtomIndices; - double vdwScale = this->getVdwScale(); double electrostaticScale = this->getElectrostaticScale()*ELECTROSTATIC_MODIFIER/this->getDielectricConstant(); // printf("%s:%d electrostaticcharge %lf\n", __FILE__, __LINE__, electrostaticScale ); bool hasForce = force.notnilp(); @@ -311,9 +307,6 @@ void EnergyPeriodicBoundaryConditionsNonbond_O::evaluateUsingExcludedAtoms(Scori double x_width = energyFunction->boundingBox()->get_x_width(); double y_width = energyFunction->boundingBox()->get_y_width(); double z_width = energyFunction->boundingBox()->get_z_width(); - double half_x_size = x_width*0.5; - double half_y_size = y_width*0.5; - double half_z_size = z_width*0.5; #define NONBOND_CALC_FORCE #define NONBOND_CALC_DIAGONAL_HESSIAN @@ -338,11 +331,12 @@ void EnergyPeriodicBoundaryConditionsNonbond_O::evaluateUsingExcludedAtoms(Scori // arrays so that only one thread updates each element at a time. LOG("Nonbond component is enabled" ); #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop // printf("%s:%d:%s Entering\n", __FILE__, __LINE__, __FUNCTION__ ); - double x1,y1,z1,x2,y2,z2,dA,dC,dQ1Q2,dA_old,dC_old,dQ1Q2_old; + double x1,y1,z1,x2,y2,z2,dA,dC,dQ1Q2; int I1, I2; int i = 0; int endIndex = pos->length()/3; @@ -498,9 +492,6 @@ void EnergyPeriodicBoundaryConditionsNonbond_O::compareAnalyticalAndNumericalFor double x_width = energyFunction->boundingBox()->get_x_width(); double y_width = energyFunction->boundingBox()->get_y_width(); double z_width = energyFunction->boundingBox()->get_z_width(); - double half_x_size = x_width*0.5; - double half_y_size = y_width*0.5; - double half_z_size = z_width*0.5; // @@ -532,7 +523,8 @@ void EnergyPeriodicBoundaryConditionsNonbond_O::compareAnalyticalAndNumericalFor { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop double x1,y1,z1,x2,y2,z2,dA,dC,dQ1Q2; @@ -565,9 +557,6 @@ core::List_sp EnergyPeriodicBoundaryConditionsNonbond_O::checkForBeyondThreshold double x_width = energyFunction->boundingBox()->get_x_width(); double y_width = energyFunction->boundingBox()->get_y_width(); double z_width = energyFunction->boundingBox()->get_z_width(); - double half_x_size = x_width*0.5; - double half_y_size = y_width*0.5; - double half_z_size = z_width*0.5; ql::list result; bool calcForce = true; // printf("%s:%d:%s number of entries pos -> %lu\n", __FILE__, __LINE__, __FUNCTION__, pos->length()/3); @@ -578,8 +567,7 @@ core::List_sp EnergyPeriodicBoundaryConditionsNonbond_O::checkForBeyondThreshold } core::SimpleVector_int32_t_sp numberOfExcludedAtoms = this->_NumberOfExcludedAtomIndices; core::SimpleVector_int32_t_sp excludedAtomIndices = this->_ExcludedAtomIndices; - double vdwScale = this->getVdwScale(); - double electrostaticScale = this->getElectrostaticScale()*ELECTROSTATIC_MODIFIER/this->getDielectricConstant(); +// double electrostaticScale = this->getElectrostaticScale()*ELECTROSTATIC_MODIFIER/this->getDielectricConstant(); // printf("%s:%d electrostaticcharge %lf\n", __FILE__, __LINE__, electrostaticScale ); #define NONBOND_CALC_FORCE #undef NONBOND_CALC_DIAGONAL_HESSIAN @@ -605,11 +593,12 @@ core::List_sp EnergyPeriodicBoundaryConditionsNonbond_O::checkForBeyondThreshold // arrays so that only one thread updates each element at a time. LOG("Nonbond component is enabled" ); #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop // printf("%s:%d:%s Entering\n", __FILE__, __LINE__, __FUNCTION__ ); - double x1,y1,z1,x2,y2,z2,dA,dC,dQ1Q2,dA_old,dC_old,dQ1Q2_old; + double x1,y1,z1,x2,y2,z2,dA,dC,dQ1Q2; int I1, I2; int i = 0; int endIndex = pos->length()/3; @@ -629,7 +618,7 @@ core::List_sp EnergyPeriodicBoundaryConditionsNonbond_O::checkForBeyondThreshold bool has_excluded_atoms = ((*excludedAtomIndices)[excludedAtomIndex] >= 0); int numberOfExcludedAtomsRemaining = numberOfExcludedAtoms->operator[](index1); double charge11 = (*this->_charge_vector)[index1]; - double electrostatic_scaled_charge11 = charge11*electrostaticScale; +// double electrostatic_scaled_charge11 = charge11*electrostaticScale; for ( int index2 = index1+1, index2_end(endIndex); index2 < index2_end; ++index2 ) { LOG(" --- top of inner loop numberOfExcludedAtomsRemaining -> %d index2 -> %d\n" , numberOfExcludedAtomsRemaining , index2 ); int maybe_excluded_atom = (*excludedAtomIndices)[excludedAtomIndex]; diff --git a/src/chem/energyPointToLineRestraint.cc b/src/chem/energyPointToLineRestraint.cc index 99ae51c4..021838c1 100644 --- a/src/chem/energyPointToLineRestraint.cc +++ b/src/chem/energyPointToLineRestraint.cc @@ -61,8 +61,6 @@ double EnergyPointToLineRestraint_O::evaluateAllComponent( ScoringFunction_sp sc { this->_Evaluations++; bool hasForce = force.notnilp(); - bool hasHessian = hessian.notnilp(); - bool hasHdAndD = (hdvec.notnilp())&&(dvec.notnilp()); // // Copy from implementAmberFunction::evaluateAll // diff --git a/src/chem/energyRigidBodyNonbond.cc b/src/chem/energyRigidBodyNonbond.cc index 72d09eea..6150c7c0 100644 --- a/src/chem/energyRigidBodyNonbond.cc +++ b/src/chem/energyRigidBodyNonbond.cc @@ -190,7 +190,6 @@ void EnergyRigidBodyNonbond_O::dumpTerms() CL_DEFMETHOD core::List_sp EnergyRigidBodyNonbond_O::parts_as_list(NVector_sp pos) { ql::list result; - size_t istart = 0; #undef NONBOND_POSITION_RB_SET_PARAMETER #define NONBOND_POSITION_RB_SET_PARAMETER(x) {} #undef NONBOND_POSITION_RB_SET_POSITION @@ -198,7 +197,7 @@ CL_DEFMETHOD core::List_sp EnergyRigidBodyNonbond_O::parts_as_list(NVector_sp po #undef NONBOND_POSITION_RB_SET_POINT #define NONBOND_POSITION_RB_SET_POINT(x,ii,of) {x=ii._Position.of;} #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop double am, bm, cm, dm, xm, ym, zm; @@ -246,7 +245,6 @@ output : A complex-vector-float where the transformed points are written. )dx") CL_DEFMETHOD core::ComplexVector_float_sp EnergyRigidBodyNonbond_O::write_rigid_body_coordinates_to_complex_vector_float(NVector_sp rigid_body_pos, core::Array_sp end_indicesx3, NVector_sp coordinates, core::ComplexVector_float_sp output) { - size_t istart = 0; #undef NONBOND_POSITION_RB_SET_PARAMETER #define NONBOND_POSITION_RB_SET_PARAMETER(x) {} #undef NONBOND_POSITION_RB_SET_POSITION @@ -254,13 +252,13 @@ CL_DEFMETHOD core::ComplexVector_float_sp EnergyRigidBodyNonbond_O::write_rigid_ #undef NONBOND_POSITION_RB_SET_POINT #define NONBOND_POSITION_RB_SET_POINT(x,ii,of) {x=ii.of;} #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop double am, bm, cm, dm, xm, ym, zm; double pxm, pym, pzm; int I1; - size_t coordIndex = 0; +// size_t coordIndex = 0; size_t I1start = 0; coordinate_lookup ea1(coordinates); for ( size_t iI1 = 0; iI1length(); ++iI1 ) { @@ -294,7 +292,6 @@ CL_DEFMETHOD core::ComplexVector_float_sp EnergyRigidBodyNonbond_O::write_rigid_ CL_DEFMETHOD core::ComplexVector_float_sp EnergyRigidBodyNonbond_O::write_nonbond_atom_coordinates_to_complex_vector_float(NVector_sp pos, core::ComplexVector_float_sp parts) { - size_t istart = 0; #undef NONBOND_POSITION_RB_SET_PARAMETER #define NONBOND_POSITION_RB_SET_PARAMETER(x) {} #undef NONBOND_POSITION_RB_SET_POSITION @@ -302,7 +299,7 @@ CL_DEFMETHOD core::ComplexVector_float_sp EnergyRigidBodyNonbond_O::write_nonbon #undef NONBOND_POSITION_RB_SET_POINT #define NONBOND_POSITION_RB_SET_POINT(x,ii,of) {x=ii._Position.of;} #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop double am, bm, cm, dm, xm, ym, zm; @@ -350,7 +347,6 @@ CL_DEFMETHOD core::ComplexVector_float_sp EnergyRigidBodyNonbond_O::write_nonbon CL_DEFMETHOD core::ComplexVector_sp EnergyRigidBodyNonbond_O::write_nonbond_atoms_to_complex_vector(core::ComplexVector_sp parts) { - size_t istart = 0; #undef NONBOND_POSITION_RB_SET_PARAMETER #define NONBOND_POSITION_RB_SET_PARAMETER(x) {} #undef NONBOND_POSITION_RB_SET_POSITION @@ -358,12 +354,9 @@ CL_DEFMETHOD core::ComplexVector_sp EnergyRigidBodyNonbond_O::write_nonbond_atom #undef NONBOND_POSITION_RB_SET_POINT #define NONBOND_POSITION_RB_SET_POINT(x,ii,of) {x=ii._Position.of;} #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop - double am, bm, cm, dm, xm, ym, zm; - double pxm, pym, pzm; - int I1; size_t I1start = 0; for ( size_t iI1 = 0; iI1_RigidBodyEndAtom->length(); ++iI1 ) { size_t I1end = (*this->_RigidBodyEndAtom)[iI1]; @@ -404,14 +397,11 @@ double EnergyRigidBodyNonbond_O::evaluateAllComponent( ScoringFunction_sp score, { this->_Evaluations++; if (this->_CrossTerms.size() == 0 ) this->initializeCrossTerms(false); - double vdwScale = this->getVdwScale(); double electrostaticScale = this->getElectrostaticScale()*ELECTROSTATIC_MODIFIER/this->getDielectricConstant(); this->_EnergyElectrostatic = 0.0; this->_EnergyVdw = 0.0; this->_TotalEnergy = 0.0; bool hasForce = force.notnilp(); - bool hasHessian = hessian.notnilp(); - bool hasHdAndD = (hdvec.notnilp())&&(dvec.notnilp()); RigidBodyEnergyFunction_sp rigidBodyEnergyFunction = gc::As(score); BoundingBox_sp boundingBox = rigidBodyEnergyFunction->boundingBox(); if (boundingBox.unboundp()) { @@ -462,7 +452,7 @@ double EnergyRigidBodyNonbond_O::evaluateAllComponent( ScoringFunction_sp score, // arrays so that only one thread updates each element at a time. LOG("Nonbond component is enabled" ); #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop double dA,dC,dQ1Q2; @@ -629,7 +619,7 @@ void EnergyRigidBodyNonbond_O::compareAnalyticalAndNumericalForceAndHessianTermB { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop double x1,y1,z1,x2,y2,z2,dA,dC,dQ1Q2; diff --git a/src/chem/energyRigidBodyStaple.cc b/src/chem/energyRigidBodyStaple.cc index f1c94773..16c2ccb4 100644 --- a/src/chem/energyRigidBodyStaple.cc +++ b/src/chem/energyRigidBodyStaple.cc @@ -87,9 +87,9 @@ double _evaluateEnergyOnly_STAPLE (double ak, #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop #pragma clang diagnostic pop @@ -116,10 +116,6 @@ void EnergyRigidBodyStaple_O::setupHessianPreconditioner( AbstractLargeSquareMatrix_sp m ) { bool calcForce = true; - bool calcDiagonalHessian = true; - bool calcOffDiagonalHessian = true; - double ks; - size_t rba, rbb; double pxk, pyk, pzk; double pxl, pyl, pzl; double ak, bk, ck, dk, xk, yk, zk; @@ -148,7 +144,8 @@ void EnergyRigidBodyStaple_O::setupHessianPreconditioner( { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop // double x1,y1,z1,x2,y2,z2,kxb,r0; @@ -186,10 +183,7 @@ double EnergyRigidBodyStaple_O::evaluateAllComponent( ScoringFunction_sp score, ANN(hdvec); ANN(dvec); bool hasForce = force.notnilp(); - bool hasHessian = hessian.notnilp(); - bool hasHdAndD = (hdvec.notnilp())&&(dvec.notnilp()); double ks, r0; - size_t rba, rbb; double pxk, pyk, pzk; double pxl, pyl, pzl; double ak, bk, ck, dk, xk, yk, zk; @@ -215,7 +209,7 @@ double EnergyRigidBodyStaple_O::evaluateAllComponent( ScoringFunction_sp score, { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop int I1, I2,i; @@ -334,9 +328,11 @@ void EnergyRigidBodyStaple_O::addTerm(const EnergyRigidBodyStaple& term) CL_DEFMETHOD core::List_sp EnergyRigidBodyStaple_O::parts_as_list(NVector_sp pos) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" ql::list result; double ks, r0; - size_t rba, rbb; double pxk, pyk, pzk; double pxl, pyl, pzl; double ak, bk, ck, dk, xk, yk, zk; @@ -349,8 +345,6 @@ CL_DEFMETHOD core::List_sp EnergyRigidBodyStaple_O::parts_as_list(NVector_sp po #undef STAPLE_POSITION_SET_POSITION #define STAPLE_POSITION_SET_POSITION(x,ii,of) {x = pos->getElement(ii+of);} -#pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop int i; diff --git a/src/chem/energySketchNonbond.cc b/src/chem/energySketchNonbond.cc index bdcf3515..d7b57088 100644 --- a/src/chem/energySketchNonbond.cc +++ b/src/chem/energySketchNonbond.cc @@ -54,8 +54,6 @@ This is an open source license for the CANDO software from Temple University, bu #define DEBUG_NONBOND_TERM 1 -#define LOG_ENERGY(x) -//#define LOG_ENERGY core::write_bf_stream namespace chem { @@ -136,9 +134,6 @@ void EnergySketchNonbond_O::evaluateTerms(NVector_sp pos, { this->_Evaluations++; // printf("%s:%d:%s Entering\n", __FILE__, __LINE__, __FUNCTION__ ); - bool hasForce = force.notnilp(); - bool hasHessian = hessian.notnilp(); - bool hasHdAndD = (hdvec.notnilp())&&(dvec.notnilp()); #define Log(x) log(x) #define EREP_CALC_FORCE #define EREP_CALC_DIAGONAL_HESSIAN @@ -156,16 +151,18 @@ void EnergySketchNonbond_O::evaluateTerms(NVector_sp pos, #define EREP_DIAGONAL_HESSIAN_ACCUMULATE DiagHessAcc #define EREP_OFF_DIAGONAL_HESSIAN_ACCUMULATE OffDiagHessAcc #define MAYBE_BAIL(val) {} if (val <=0.1 ) goto TOO_CLOSE; if ( val >= this->_LongDistanceCutoff) goto TOO_FAR; - + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-variable" #include +#pragma clang diagnostic pop double* coordinates_ptr = (double*)(pos->rowMajorAddressOfElement_(0)); double* force_ptr = (double*)(force->rowMajorAddressOfElement_(0)); double x1,y1,z1,x2,y2,z2,crep; double dx, dy, dz; - double dsq, ERepDistance; + double dsq; double crep_over_dsq; - double cutoff_sq = this->_LongDistanceCutoff*this->_LongDistanceCutoff; for ( size_t index = 0; index_Terms.size(); ++index ) { EnergySketchNonbond& ea = this->_Terms[index]; if (this->_FreezeFlags&ea._FreezeFlags) continue; diff --git a/src/chem/energySketchStretch.cc b/src/chem/energySketchStretch.cc index c6588a32..57f3e1ce 100644 --- a/src/chem/energySketchStretch.cc +++ b/src/chem/energySketchStretch.cc @@ -84,12 +84,10 @@ double _evaluateEnergyOnly_SketchStretch ( #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" -#pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop -#pragma clang diagnostic pop #if !USE_EXPLICIT_DECLARES double fx1 = 0.0; @@ -136,7 +134,8 @@ void EnergySketchStretch_O::setupHessianPreconditioner( { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop #if !USE_EXPLICIT_DECLARES @@ -199,7 +198,7 @@ double EnergySketchStretch_O::evaluateAllComponent( ScoringFunction_sp score, { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop fx1 = 0.0; fy1 = 0.0; fz1 = 0.0; diff --git a/src/chem/energyStretch.cc b/src/chem/energyStretch.cc index 027746d0..0c8eb46c 100644 --- a/src/chem/energyStretch.cc +++ b/src/chem/energyStretch.cc @@ -189,9 +189,9 @@ double _evaluateEnergyOnly_Stretch ( #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop #pragma clang diagnostic pop @@ -241,7 +241,8 @@ void EnergyStretch_O::setupHessianPreconditioner( { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop #if !USE_EXPLICIT_DECLARES @@ -317,7 +318,7 @@ double EnergyStretch_O::evaluateAllComponent( ScoringFunction_sp score, #define STRETCH_OFF_DIAGONAL_HESSIAN_ACCUMULATE OffDiagHessAcc #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop fx1 = 0.0; fy1 = 0.0; fz1 = 0.0; @@ -393,7 +394,7 @@ double EnergyStretch_O::evaluateAllComponent( ScoringFunction_sp score, void EnergyStretch_O::compareAnalyticalAndNumericalForceAndHessianTermByTerm( NVector_sp pos) { - int fails = 0; + int fails = 0; bool calcForce = true; bool calcDiagonalHessian = true; bool calcOffDiagonalHessian = true; @@ -418,7 +419,8 @@ void EnergyStretch_O::compareAnalyticalAndNumericalForceAndHessianTermByTerm( NV { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop fx1 = 0.0; fy1 = 0.0; fz1 = 0.0; @@ -458,7 +460,6 @@ SYMBOL_EXPORT_SC_(KeywordPkg,force); core::List_sp EnergyStretch_O::checkForBeyondThresholdInteractionsWithPosition(NVector_sp pos, double threshold) { ql::list result; - int fails = 0; bool calcForce = true; // bool calcForce = false; // bool calcDiagonalHessian = false; @@ -483,7 +484,8 @@ core::List_sp EnergyStretch_O::checkForBeyondThresholdInteractionsWithPosition(N { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-but-set-variable" #include #pragma clang diagnostic pop fx1 = 0.0; fy1 = 0.0; fz1 = 0.0; @@ -692,8 +694,6 @@ core::List_sp EnergyStretch_O::lookupStretchTerms(AtomTable_sp atomTable, Atom_s core::T_sp tia2 = atomTable->_AtomTableIndices->gethash(a2); if (!tia1.fixnump()) SIMPLE_ERROR(("Could not find %s in energy function") , _rep_(a1)); if (!tia2.fixnump()) SIMPLE_ERROR(("Could not find %s in energy function") , _rep_(a2)); - int ia1 = tia1.unsafe_fixnum(); - int ia2 = tia2.unsafe_fixnum(); for (auto edi=this->_Terms.begin();edi!=this->_Terms.end();edi++) { if ((edi->_Atom1==a1 && edi->_Atom2==a2) diff --git a/src/chem/ffNonbondDb.cc b/src/chem/ffNonbondDb.cc index fd434cbc..c98b3595 100644 --- a/src/chem/ffNonbondDb.cc +++ b/src/chem/ffNonbondDb.cc @@ -255,7 +255,6 @@ void FFNonbondDb_O::forceFieldMerge(FFBaseDb_sp bother) this->forceFieldMergeGlobalParameters(other); // Merge the terms and overwrite old ones with the same name for ( size_t i(0), iEnd(other->_Terms.size()); i_Parameters->gethash(other->_Terms[i]->getType()); if (found.notnilp()) { this->_Terms[found.unsafe_fixnum()] = other->_Terms[i]; diff --git a/src/chem/ffTypesDb.cc b/src/chem/ffTypesDb.cc index 3440c8b1..a47cf6d8 100644 --- a/src/chem/ffTypesDb.cc +++ b/src/chem/ffTypesDb.cc @@ -106,8 +106,6 @@ CL_DEFMETHOD core::Symbol_sp FFTypesDb_O::assignType(chem::Atom_sp atom) { { Root_sp root = (*it)->_Test; core::T_mv matches_mv = chem::chem__chem_info_match(root,atom); - core::MultipleValues &values = core::lisp_multipleValues(); - ChemInfoMatch_sp match = gc::As(values.second(matches_mv.number_of_values())); if ( matches_mv.notnilp() ) { LOG("Rule MATCH!!!" ); if (chem__verbose(2)) core::write_bf_stream(fmt::sprintf("Matched %s type-> %s\n" , _rep_(root) , _rep_((*it)->_Type))); diff --git a/src/chem/loop.cc b/src/chem/loop.cc index 704098cb..e82abffe 100644 --- a/src/chem/loop.cc +++ b/src/chem/loop.cc @@ -620,7 +620,6 @@ Matter_sp Loop::nextHierarchyMatter() void Loop::advanceLoop() { Matter_sp retVal; - int goalOnly; LOG("Loop::next start" ); if ( this->done ) { @@ -629,8 +628,6 @@ void Loop::advanceLoop() } LOG("Loop::next running" ); - goalOnly = this->goal & GOALONLY; - LOG("Loop::next running" ); retVal = this->nextHierarchyMatter(); //DONE: diff --git a/src/chem/maxcliqueseq.cc b/src/chem/maxcliqueseq.cc index 4c21a99c..7d8e0694 100644 --- a/src/chem/maxcliqueseq.cc +++ b/src/chem/maxcliqueseq.cc @@ -206,8 +206,7 @@ typedef KillTimer KillTimer1; #include #include -#define __linux -#ifndef __linux +#if defined(_WIN32) || defined(_WIN64) #include typedef LARGE_INTEGER time_type ; @@ -238,12 +237,12 @@ class TimeType { #endif //WIN32 } -#ifdef __linux - void getSysTime() {clock_gettime(CLOCK_REALTIME, &time);} // when linking, must include: -lrt - void init() {time.tv_sec = time.tv_nsec = 0l;} +#if defined WIN32 || WIN64 + void getSysTime() {QueryPerformanceCounter(&time);} + void init() {time.QuadPart = 0;} #else - void getSysTime() {QueryPerformanceCounter(&time);} - void init() {time.QuadPart = 0;} + void getSysTime() {clock_gettime(CLOCK_REALTIME, &time);} // when linking, must include: -lrt + void init() {time.tv_sec = time.tv_nsec = 0l;} #endif //linux TimeType operator- (const TimeType& t) const {return TimeType(time_sub(time, t.time));} @@ -1236,7 +1235,7 @@ class ParallelMaximumCliqueProblem : public InitialSort_t { std::cout << "-- " << std::setw(80-3) << std::setfill('-') << std::left << algorithmName.str(); std::cout.flags(basefmt); std::cout << std::setfill(baseFill) << "\n"; - unsigned long long steps = 0, sorts = 0; + unsigned long long steps = 0; for (size_t i = 0; i < workerSteps.size(); ++i) { steps += workerSteps[i]; } diff --git a/src/chem/minimizer.cc b/src/chem/minimizer.cc index 7b9dac4f..74846ecf 100644 --- a/src/chem/minimizer.cc +++ b/src/chem/minimizer.cc @@ -197,8 +197,6 @@ DOCGROUP(cando); CL_DEFUN Minimizer_sp Minimizer_O::make(ScoringFunction_sp givenEnergyFunction) { auto me = gctools::GC::allocate_with_default_constructor(); - bool initialized = false; - initialized = true; me->setEnergyFunction(givenEnergyFunction); return me; } @@ -777,9 +775,7 @@ void Minimizer_O::lineSearch( double *dPstep, double xa, xb, xc; double fa, fb, fc; double step = 0.0; - int functionEvals; - functionEvals = 0; LOG("Starting" ); // @@ -929,8 +925,7 @@ void Minimizer_O::_steepestDescent( int numSteps, double step, fnew, dirMag; double cosAngle = 0.0; bool steepestDescent; - int innerSteps; - int localSteps, k; + int localSteps; bool printedLatestMessage; LOG("Checking status" ); @@ -940,7 +935,6 @@ void Minimizer_O::_steepestDescent( int numSteps, LOG("step" ); localSteps = 0; - k = 0; step = 0.0; LOG("step" ); @@ -958,7 +952,6 @@ void Minimizer_O::_steepestDescent( int numSteps, tv2 = NVector_O::create(iRestartSteps); LOG("step" ); // Done - innerSteps = MIN(iRestartSteps,ITMAX); LOG("step" ); double fp = this->dTotalEnergyForce( x, force ); LOG("step" ); @@ -998,6 +991,7 @@ void Minimizer_O::_steepestDescent( int numSteps, deltaNew = dotProduct(force,dir,this->_Frozen); delta0 = deltaNew; eSquaredDelta0 = forceTolerance*delta0; + (void)eSquaredDelta0; // sham use LOG("eSquaredDelta0 = %lf" , (eSquaredDelta0 ) ); LOG("forceTolerance = %lf" , (forceTolerance ) ); LOG("delta0 = %lf" , (delta0 ) ); @@ -1209,11 +1203,10 @@ void Minimizer_O::_conjugateGradient(int numSteps, double delta0, deltaNew, deltaMid, deltaOld; double eSquaredDelta0; double step, fnew ; - int innerSteps; int localSteps, k; double beta, cosAngle, dirMag; bool steepestDescent; - int refactor; + // int refactor; size_t printedLatestMessage; if ( this->_Status == minimizerError ) return; @@ -1221,7 +1214,7 @@ void Minimizer_O::_conjugateGradient(int numSteps, this->_CurrentPreconditioner = noPreconditioner; localSteps = 0; k = 0; - refactor = 0; + //refactor = 0; /* Calculate how many conjugate gradient steps can be */ /* taken before a restart must be done */ @@ -1235,7 +1228,6 @@ void Minimizer_O::_conjugateGradient(int numSteps, tv1 = NVector_O::create(iRestartSteps); tv2 = NVector_O::create(iRestartSteps); // Done - innerSteps = MIN(iRestartSteps,ITMAX); double fp = dTotalEnergyForce( x, force ); // r->inPlaceTimesScalar(-1.0); // TODO calculate preconditioner here @@ -1270,6 +1262,7 @@ void Minimizer_O::_conjugateGradient(int numSteps, deltaNew = dotProduct(force,d,this->_Frozen); delta0 = deltaNew; eSquaredDelta0 = forceTolerance*delta0; + (void)eSquaredDelta0; LOG("eSquaredDelta0 = %lf" , (eSquaredDelta0 ) ); LOG("forceTolerance = %lf" , (forceTolerance ) ); LOG("delta0 = %lf" , (delta0 ) ); @@ -1440,7 +1433,7 @@ void Minimizer_O::_conjugateGradient(int numSteps, // if ( refactor >= 5 ) { this->_EnergyFunction->setupHessianPreconditioner(x,m); this->_EnergyFunction->unconventionalModifiedCholeskyFactorization(m,ldlt); - refactor = 0; + // refactor = 0; // } this->_EnergyFunction->backSubstituteLDLt(ldlt,s,force); break; @@ -1891,13 +1884,10 @@ void Minimizer_O::_evaluateEnergyAndForceManyTimes( int numSteps, NVector_sp nv #define MINCHANGE 0.01 NVector_sp nvDir, nvNewPos, nvNewForce, nvTempPos, nvTempForce; - double dEnergy, dX, dRms; int iCount; int iSize; /* Create the Direction vector */ - dRms = 0.0; - dX = 1.0; iSize = nvPos->size(); nvDir = NVector_O::create( iSize ); nvNewPos = NVector_O::create( iSize ); @@ -1908,7 +1898,7 @@ void Minimizer_O::_evaluateEnergyAndForceManyTimes( int numSteps, NVector_sp nv iCount = 0; this->_Iteration = 1; do { - dEnergy = this->dTotalEnergyForce( nvPos, nvNewForce); + this->dTotalEnergyForce( nvPos, nvNewForce); if ( iCount % 10000 == 0 ) { core::clasp_writeln_string(fmt::sprintf("Evaluating energy step#%d" , iCount )); } diff --git a/src/chem/mol2.cc b/src/chem/mol2.cc index c1370150..28639545 100644 --- a/src/chem/mol2.cc +++ b/src/chem/mol2.cc @@ -492,7 +492,6 @@ core::T_sp mol2Read(Mol2File& fIn) // First create all of the Aggregate // (Tripos calls this a molecule and it can have multiple chains.) // - auto mi = molecules.begin(); Aggregate_sp aggregate = Aggregate_O::create(); if (boundingBox.notnilp()) { BoundingBox_sp bb = BoundingBox_O::make(boundingBox,nil(),nil()); diff --git a/src/chem/monomer.cc b/src/chem/monomer.cc index 30934833..59199bfd 100644 --- a/src/chem/monomer.cc +++ b/src/chem/monomer.cc @@ -790,7 +790,6 @@ CL_DEFMETHOD void Monomer_O::addIsoname(Isoname_sp name) CL_DEFMETHOD void Monomer_O::addTopologyName(core::Symbol_sp name) { Topology_sp topology = gc::As(chem__findTopology(name)); - core::List_sp plugs = topology->plugsAsList(); if (this->_Monomers.size()!=0) { Topology_sp topology0 = gc::As(chem__findTopology(this->_Monomers[0])); if (!topology0->matchesPlugs(topology)) { diff --git a/src/chem/monomerCoordinates.cc b/src/chem/monomerCoordinates.cc index 656a5e0e..d720f76a 100644 --- a/src/chem/monomerCoordinates.cc +++ b/src/chem/monomerCoordinates.cc @@ -256,9 +256,9 @@ CL_DEFMETHOD core::List_sp MonomerCoordinates_O::testExtraction( stage->extractCoordinatesFromMatter(aggregate); stage->setComplete(true); conformationExplorer->appendEntry(entry); - core::T_sp problems = core::clasp_make_string_output_stream(); IMPLEMENT_MEF("The following code catches an exception - figure out how to do it using Conditions"); #if 0 + core::T_sp problems = core::clasp_make_string_output_stream(); TRY() { this->_defineFromConformationExplorerOrDebug(topology,conformationExplorer,focusMonomer,true,UndefinedUnsignedInt); diff --git a/src/chem/nVector.cc b/src/chem/nVector.cc index 5047c95a..dc46bd91 100644 --- a/src/chem/nVector.cc +++ b/src/chem/nVector.cc @@ -325,8 +325,6 @@ DOCGROUP(cando); CL_DEFUN NVector_sp chem__apply_transform_to_coordinates(NVector_sp destination, NVector_sp coordinates, const Matrix& transform ) { - Vector3* pos; - Vector3* dest; size_t len = coordinates->length(); for ( size_t index = 0; index < len; index+=3) { // printf("%s:%d coordinates[%lu/%lu] -> %lf %lf %lf\n", __FILE__, __LINE__, index, len, (*coordinates)[index],(*coordinates)[index+1],(*coordinates)[index+2]); @@ -401,15 +399,11 @@ core::T_mv chem__find_close_contact_in_bounding_box(NVector_sp coord1, size_t le double x_rsize = 1.0 / x_size; double y_rsize = 1.0 / y_size; double z_rsize = 1.0 / z_size; - Vector3* pos1 = (Vector3*)&(*coord1)[0]; - Vector3* pos2 = (Vector3*)&(*coord2)[0]; size_t min_i1 = 0; size_t min_i2 = 0; double min_dist_squared = dist_squared_bounding_box(coord1,0,coord2,0,x_size,y_size,z_size,x_rsize,y_rsize,z_rsize); for ( size_t i1=0; i1length(); if (coordinates_length.fixnump()) { - if (coordinates_length.unsafe_fixnum()<=coords->length()) - coord_len = coordinates_length.unsafe_fixnum(); - else { + if (coordinates_length.unsafe_fixnum()>coord_len) { SIMPLE_ERROR(("coordinates-length %s is out of bounds - must be less than or equal to %lu") - , _rep_(coordinates_length) , coords->length()); + , _rep_(coordinates_length) , coord_len); } } else if (coordinates_length.notnilp()) { SIMPLE_ERROR(("coordinates-length must be NIL or a fixnum - it was %s") , _rep_(coordinates_length)); diff --git a/src/chem/octree.cc b/src/chem/octree.cc index ddd77683..394244e4 100644 --- a/src/chem/octree.cc +++ b/src/chem/octree.cc @@ -327,7 +327,7 @@ void AddIonOctree_O::PonMakeChildren(OctNode_sp ponNode, int iDepth, int iStatus * Make nodes & set simple stuff by initializing 1st node * and copying it. */ - auto PonChildren = gctools::GC::allocate_with_default_constructor(); +// auto PonChildren = gctools::GC::allocate_with_default_constructor(); //memset(PonChildren, 0, sizeof(OctNode_sp)); //ponNode->PonChildren->iStatus = iStatus; //ponNode->PonChildren->iDepth = iDepth; @@ -891,7 +891,7 @@ CL_DEFMETHOD void AddIonOctree_O::OctreeCreate(Aggregate_sp uUnit, AddIonOctreeE //gctools::Vec0 PaAtoms; Residue_sp rRes; size_t imd; - int i, j, iAtoms, iDefaultedRadius, iBuild; + int i, j, iAtoms, iDefaultedRadius; double dMaxRadius, dCharge, dShellRadius; double dTx, dTy, dTz, dTmax, dTmp, volumePercentage; @@ -906,7 +906,7 @@ CL_DEFMETHOD void AddIonOctree_O::OctreeCreate(Aggregate_sp uUnit, AddIonOctreeE /* * Create the octree "object" and initialize */ - auto octTree = gctools::GC::allocate_with_default_constructor(); +// auto octTree = gctools::GC::allocate_with_default_constructor(); core::MultipleValues &values = core::lisp_multipleValues(); // octTree->iType = iType; //octTree->dGridSize = dGridSpace; @@ -1213,14 +1213,14 @@ return(octTree); switch ( type ) { case Shell: - iBuild = iBuildShellOctant( this->onHead, iAtoms, vaAtoms, dShellRadius ); //PaAtoms ); + iBuildShellOctant( this->onHead, iAtoms, vaAtoms, dShellRadius ); //PaAtoms ); break; case InteriorSolute: case InteriorSolvent: if (bVerbose) { core::write_bf_stream(fmt::sprintf( "About to build interior octant iAtoms -> %lu\n" , iAtoms )); } - iBuild = iBuildInteriorOctant( this->onHead, iAtoms, vaAtoms ); //PaAtoms ); + iBuildInteriorOctant( this->onHead, iAtoms, vaAtoms ); //PaAtoms ); break; default: SIMPLE_ERROR(("bad switch\n")); diff --git a/src/chem/oligomer.cc b/src/chem/oligomer.cc index 272d02fb..fcd11fc3 100644 --- a/src/chem/oligomer.cc +++ b/src/chem/oligomer.cc @@ -178,7 +178,6 @@ CL_NAME(CHEM:OLIGOMER/COUPLINGS-AS-LIST); CL_DEFMETHOD core::List_sp Oligomer_O::couplingsAsList() { ql::list result; - core::List_sp cons = nil(); gctools::Vec0::iterator mi; for ( mi=this->_Couplings.begin(); mi!=this->_Couplings.end(); mi++ ) { @@ -807,12 +806,9 @@ Bignum numSeq; CL_DEFMETHOD bool Oligomer_O::incrementSequence() { gctools::Vec0::iterator mi; -long unsigned int numSeq; - numSeq = 1; for ( mi=this->_Monomers.begin(); mi!=this->_Monomers.end(); mi++ ) { if ( (*mi)->incrementMonomerIndex() ) return true; - numSeq *= (*mi)->numberOfStereoisomers(); } return false; } diff --git a/src/chem/pdb.cc b/src/chem/pdb.cc index 30bc75f6..3abc5a3f 100644 --- a/src/chem/pdb.cc +++ b/src/chem/pdb.cc @@ -413,7 +413,6 @@ void PdbReader_O::archive(core::ArchiveP node) Aggregate_sp PdbReader_O::parse(core::T_sp stream) { - char buffer[1024]; EntirePdbRec pdbRec; int moleculeIdx = 0; { diff --git a/src/chem/readAmberParameters.cc b/src/chem/readAmberParameters.cc index 487e71c4..4f657c5f 100644 --- a/src/chem/readAmberParameters.cc +++ b/src/chem/readAmberParameters.cc @@ -522,7 +522,6 @@ string ReadAmberParameters_O::parseNonbondLabelKindNB(core::T_sp fin) SYMBOL_EXPORT_SC_(KeywordPkg,end); void ReadAmberParameters_O::parseNonbondDb(core::T_sp fin, FFNonbondDb_sp ffNonbondDb) { - bool done = false; while ( 1 ) { core::T_sp tline = core::cl__read_line(fin,nil(),nil()); if (tline.nilp()) break; @@ -723,7 +722,6 @@ ForceField_sp ReadAmberParameters_O::parseAmberFormattedForceField(core::T_sp fi ForceField_sp ReadAmberParameters_O::parseFrcModFile(core::T_sp fin, core::T_sp system) { auto ff = gctools::GC::allocate_with_default_constructor(); auto nonbondDb = gctools::GC::allocate_with_default_constructor(); - int lastSegment = 0; bool readMasses = false; bool readNonbond = false; core::T_mv mv_title = core::cl__read_line(fin,nil()); @@ -737,26 +735,20 @@ ForceField_sp ReadAmberParameters_O::parseFrcModFile(core::T_sp fin, core::T_sp LOG("Read line(%s)" , line ); if ( line.size()>=4 && line.substr(0,4) == "MASS") { nonbondDb = this->parseMasses(fin,nonbondDb); - lastSegment = 1; readMasses = true; } else if ( line.size()>=4 && line.substr(0,4) == "BOND") { ff->setFFStretchDb(this->parseStretchDb(fin)); - lastSegment = 2; } else if ( line.size()>=4 && line.substr(0,4) == "ANGL") { ff->setFFAngleDb(this->parseAngleDb(fin)); - lastSegment = 3; } else if ( line.size()>=4 && line.substr(0,4) == "DIHE") { ff->setFFPtorDb(this->parsePtorDb(fin,system)); - lastSegment = 4; } else if ( line.size()>=4 && line.substr(0,4) == "IMPR") { ff->setFFItorDb(this->parseItorDb(fin)); - lastSegment = 5; } else if ( line.size()>=4 && line.substr(0,4) == "HBON") { SIMPLE_WARN("Skipping HBON FrcMod term"); } else if ( line.size()>=4 && line.substr(0,4) == "NONB") { this->parseNonbondDb(fin,nonbondDb); readNonbond = true; - lastSegment = 7; } else { if (line.size()>0) { SIMPLE_WARN("Ignoring %s in FrcMod", line ); diff --git a/src/chem/rigidBodyEnergyFunction.cc b/src/chem/rigidBodyEnergyFunction.cc index 24ddf115..bd89dd56 100644 --- a/src/chem/rigidBodyEnergyFunction.cc +++ b/src/chem/rigidBodyEnergyFunction.cc @@ -378,9 +378,6 @@ CL_DEFUN size_t chem__rigid_body_velocity_verlet_step_limit_displacement(Scoring } else if (tfrozen.notnilp()) { SIMPLE_ERROR(("frozen must be a simple-bit-vector or NIL")); } - double delta_tsquared = delta_t*delta_t; - double delta_tsquared_div2 = delta_tsquared/2.0; - NVector_sp position_dt = NVector_O::create(position->size()); size_t body_idx = 0; size_t body_limited = 0; for ( size_t idx = 0; idxsize(); idx += 7) { diff --git a/src/chem/rigid_staple.cc b/src/chem/rigid_staple.cc index be3f50ca..341e9af6 100644 --- a/src/chem/rigid_staple.cc +++ b/src/chem/rigid_staple.cc @@ -85,7 +85,7 @@ CL_DEFUN double chem__rigid_staple_evaluate( core::SimpleVector_double_sp helix_ { #pragma clang diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-variable" #include #pragma clang diagnostic pop #if 0 diff --git a/src/chem/ringFinder.cc b/src/chem/ringFinder.cc index 7878f6e8..b90a32c9 100644 --- a/src/chem/ringFinder.cc +++ b/src/chem/ringFinder.cc @@ -419,7 +419,6 @@ void AGVertex_O::receive(uint stage) // { vertexDict->maphash( [this,&graph,stage] (core::T_sp key, core::T_sp value) { - AGVertex_sp nodeId = gc::As(key); core::List_sp list = gc::As(value); // If there is more than one PathMessage // with the same FirstVertex then there is diff --git a/src/chem/scoringFunction.cc b/src/chem/scoringFunction.cc index 43f13feb..5d8f9f94 100644 --- a/src/chem/scoringFunction.cc +++ b/src/chem/scoringFunction.cc @@ -222,9 +222,6 @@ CL_DEFUN void chem__velocity_verlet_step(ScoringFunction_sp scoringFunc, } else if (tfrozen.notnilp()) { SIMPLE_ERROR(("frozen must be a simple-bit-vector or NIL")); } - double delta_tsquared = delta_t*delta_t; - double delta_tsquared_div2 = delta_tsquared/2.0; - NVector_sp position_dt = NVector_O::create(position->size()); size_t atom_idx = 0; if (frozen) { for ( size_t idx = 0; idxsize(); idx += 3) { @@ -308,9 +305,6 @@ CL_DEFUN size_t chem__velocity_verlet_step_limit_displacement(ScoringFunction_sp } else if (tfrozen.notnilp()) { SIMPLE_ERROR(("frozen must be a simple-bit-vector or NIL")); } - double delta_tsquared = delta_t*delta_t; - double delta_tsquared_div2 = delta_tsquared/2.0; - NVector_sp position_dt = NVector_O::create(position->size()); size_t atom_idx = 0; size_t atoms_limited = 0; for ( size_t idx = 0; idxsize(); idx += 3) { diff --git a/src/chem/sketchFunction.cc b/src/chem/sketchFunction.cc index c4fef9ea..24c0dcff 100644 --- a/src/chem/sketchFunction.cc +++ b/src/chem/sketchFunction.cc @@ -728,9 +728,7 @@ void SketchFunction_O::loadCoordinatesIntoVector(NVector_sp pos) void SketchFunction_O::saveCoordinatesFromVector(NVector_sp pos) { - int ci; double x,y,z; - gctools::Vec0::iterator ai; Vector3 v; core::T_sp tsize = core::eval::funcall(_sym_node_table_size,this->_NodeTable); ASSERT(tsize.fixnump()); @@ -823,8 +821,6 @@ CL_DEFUN void chem__SketchFunction_velocity_verlet_step(SketchFunction_sp sketch SIMPLE_ERROR(("frozen must be a simple-bit-vector or NIL")); } - double delta_tsquared = delta_t*delta_t; - double delta_tsquared_div2 = delta_tsquared/2.0; size_t atom_idx = 0; for ( size_t idx = 0; idxsize(); idx += 3) { if (!frozen || frozen->testBit(idx+0)==0) { diff --git a/src/chem/spanningLoop.cc b/src/chem/spanningLoop.cc index 08e30d27..2582522c 100644 --- a/src/chem/spanningLoop.cc +++ b/src/chem/spanningLoop.cc @@ -312,7 +312,8 @@ Atom_sp SpanningLoop_O::nextSpanningAtom(std::functioninitialized) { - SpanningInfo_sp sitop = this->storeSpanningInfo(this->top, 0, nil()); + //SpanningInfo_sp sitop = + this->storeSpanningInfo(this->top, 0, nil()); // printf("%s:%d initialize sitop -> %s\n", __FILE__, __LINE__, _rep_(sitop).c_str()); this->initialized = true; } diff --git a/src/chem/superposeEngine.cc b/src/chem/superposeEngine.cc index 522f68b5..69aeddf0 100644 --- a/src/chem/superposeEngine.cc +++ b/src/chem/superposeEngine.cc @@ -161,7 +161,7 @@ void SuperposeEngine_O::doSuperpose() { VectorVector3s Sj; VectorVector3s Si; - VectorVector3s::iterator itS,itSi,itSj; + VectorVector3s::iterator itSi,itSj; Vector3 fixedCenter,vTemp; Vector3 moveableCenter; Matrix mat,M, MT, trM, P,evecs,em,trans,rot; @@ -172,6 +172,8 @@ void SuperposeEngine_O::doSuperpose() int fixedIndicesSize, moveableIndicesSize; fixedIndicesSize = this->_FixedIndices->length(); moveableIndicesSize = this->_MoveableIndices->length(); + (void)fixedIndicesSize; + (void)moveableIndicesSize; LOG("Moveable indices fixed(%d) moveable(%d)" , fixedIndicesSize , moveableIndicesSize ); ASSERTP(fixedIndicesSize==moveableIndicesSize,"num. fixed points must equal num. of moveable points"); ASSERTF(fixedIndicesSize>=3, ("You must have at least 3 points to superpose and you only have: %d") , fixedIndicesSize ); @@ -348,8 +350,9 @@ double SuperposeEngine_O::sumOfSquaresOfDifferences(ScorerState_sp scorer CL_DEFMETHOD double SuperposeEngine_O::sumOfSquaresOfDifferences() { +#ifdef DEBUG_ON size_t itFixed; - size_t ititMoved; +#endif Vector3 moved, diff; double sum; @@ -431,7 +434,6 @@ CL_DEFMETHOD void SuperposeEngine_O::setFixedPoints( core::ComplexVector_ CL_LISPIFY_NAME("setFixedAllPoints"); CL_DEFMETHOD void SuperposeEngine_O::setFixedAllPoints( geom::SimpleVectorCoordinate_sp fc ) { - size_t ia; size_t ii; this->_FixedCoordinates = geom::ComplexVectorCoordinate_O::make_vector(fc->length(),Vector3(),core::make_fixnum(fc->length())); this->_FixedIndices = core::ComplexVector_byte32_t_O::make_vector(fc->length()); @@ -461,7 +463,6 @@ CL_DEFMETHOD void SuperposeEngine_O::setMoveablePoints( core::ComplexVect CL_LISPIFY_NAME("setMoveableAllPoints"); CL_DEFMETHOD void SuperposeEngine_O::setMoveableAllPoints( geom::SimpleVectorCoordinate_sp mc ) { - size_t ia; uint ii; ASSERTF(mc->length()>=3,("You must have at least three moveable points and there are only %d") , mc->length() ); this->_MoveableCoordinates = geom::ComplexVectorCoordinate_O::make_vector(mc->length(),Vector3(),core::make_fixnum(mc->length())); diff --git a/src/chem/topology.cc b/src/chem/topology.cc index b1af257b..6240fbef 100644 --- a/src/chem/topology.cc +++ b/src/chem/topology.cc @@ -81,9 +81,7 @@ CL_DEF_CLASS_METHOD Topology_mv Topology_O::makeTopologyFromResidue(chem::Residu SIMPLE_ERROR(("The constitution was nil - you need to pass a constitution")); } constitution = gc::As(tconstitution); - ConstitutionAtoms_sp ca = constitution->getConstitutionAtoms(); Topology_sp topology = Topology_O::make(topologyName, constitution, nil() ); - core::ComplexVector_T_sp vec = core::ComplexVector_T_O::make(residue->numberOfAtoms(),nil()); int atomIndex = 0; StereoisomerAtoms_sp stereoisomerAtoms = StereoisomerAtoms_O::create(stereoisomerName); for ( auto ai = residue->begin_atoms(); ai!=residue->end_atoms(); ++ai, ++atomIndex) { @@ -145,7 +143,6 @@ CL_DEFMETHOD Residue_sp Topology_O::buildResidueForIsomer(size_t isomer) const gctools::Vec0 atoms; atoms.resize(numAtoms); res->resizeContents(numAtoms); - size_t idx = 0; for ( size_t idx=0, idxEnd(numAtoms); idx_StereoisomerAtomProperties.size()==1) { return this->buildResidueForIsomer(0); } diff --git a/src/chem/zMatrix.cc b/src/chem/zMatrix.cc index 5c8026bb..eba61f8f 100644 --- a/src/chem/zMatrix.cc +++ b/src/chem/zMatrix.cc @@ -591,6 +591,7 @@ core::T_sp ZMatrix_O::_getAtomZMatrixNameAtIndex(uint i) const break; } } + (void)gotPeripheralAtom; // sham use ASSERTP(gotPeripheralAtom,"There were no peripheral atoms in the matter"); this->defineForMatterWithStartingAtom(matter,atom); } diff --git a/src/geom/vector3.cc b/src/geom/vector3.cc index 8de76fa7..3b062302 100644 --- a/src/geom/vector3.cc +++ b/src/geom/vector3.cc @@ -347,11 +347,8 @@ CL_DEFUN Vector3 geom__build_using_bond_angle( double distance, const Vector3& v double angle, const Vector3& va) { Vector3 vd, vdn, vr; - double ca, sa; vd = va-vb; vdn = vd.normalized(); - ca = cos(angle); - sa = sin(angle); vr = Vector3(vdn.getX()*cos(angle)+vdn.getY()*sin(angle), -vdn.getX()*sin(angle)+vdn.getY()*cos(angle), 0.0); vr = vr.multiplyByScalar(distance); @@ -428,7 +425,7 @@ double dVectorAbsAngle( const Vector3& vX, const Vector3& vY, const Vector3& vRef ) { Vector3 vT1, vT2, vT; - double dLen, dAngle; + double dAngle; vT1 = vX.normalized(); vT2 = vY.normalized(); @@ -465,7 +462,7 @@ Vector3 zvZMatrixCalculatePositionFromAngles( double dAngleA, double dAngleB, { int iCount; double dCosA, dSinA; - double dCosB, dSinB; + double dCosB; double dCosC, dSinC; double dCosX, dSinX; double dX, dXNew; @@ -475,7 +472,7 @@ Vector3 zvZMatrixCalculatePositionFromAngles( double dAngleA, double dAngleB, dCosA = cos(dAngleA); dSinA = sin(dAngleA); dCosB = cos(dAngleB); - dSinB = sin(dAngleB); + dCosC = cos(dAngleC); dSinC = sin(dAngleC); @@ -687,7 +684,6 @@ DOCGROUP(cando); CL_DEFUN void geom__vec_extract_transformed(Vector3& vec, chem::NVector_sp coordinates, size_t index0, const Matrix& transform) { if ((index0+2)length()) { - double xp, yp, zp; transform.transform_nvector_point(vec.getX(),vec.getY(),vec.getZ(),coordinates,index0); return; } diff --git a/src/kinematics/joint.cc b/src/kinematics/joint.cc index c23100fc..853729eb 100644 --- a/src/kinematics/joint.cc +++ b/src/kinematics/joint.cc @@ -96,7 +96,6 @@ struct translate::from_object DeclareType _v; from_object(core::T_sp o) { - core::Symbol_sp sym = o.as(); if (o == kw::_sym_noop_to_external) { this->_v = kinematics::noop_to_external; } else if (o == kw::_sym_noop_to_internal) { @@ -248,7 +247,6 @@ void Joint_O::addChild(Joint_sp child) child->setParent(this->asSmartPtr()); } else { LOG("It's a non-jump atom"); - int firstNonJumpIndex = this->firstNonJumpChildIndex(); LOG(BF("We are at the end of the Children - appending")); this->_appendChild(child); child->setParent(this->asSmartPtr()); diff --git a/src/units/quantity.cc b/src/units/quantity.cc index b7917d99..9f13b914 100644 --- a/src/units/quantity.cc +++ b/src/units/quantity.cc @@ -62,12 +62,12 @@ core::T_sp Quantity_O::copyAndScaleValue(core::T_sp obj, double conversion) { geom::OVector3_sp nval = geom::OVector3_O::create(oval->get().multiplyByScalar(conversion)); return nval; } else if (obj.isA()) { - core::Array_sp array = obj.as(); - // core::Array_sp narray = array->deepCopy().as(); FIX_ME(); #if 0 - narray->multiplyByScalar(conversion); - return narray; + core::Array_sp array = obj.as(); + core::Array_sp narray = array->deepCopy().as(); + narray->multiplyByScalar(conversion); + return narray; #endif } SIMPLE_ERROR(("Illegal value type[%s] for copyAndScaleValue"), core::cl__class_of(obj)->_classNameAsString()); @@ -84,9 +84,9 @@ core::T_sp Quantity_O::copyAndScaleValueElement(core::T_sp obj, uint index, doub core::T_sp Quantity_O::copyValueElement(core::T_sp obj, uint index) { if (obj.isA()) { - core::Vector_sp vec = gc::As_unsafe(obj); FIX_ME(); // implement copy of object? #if 0 + core::Vector_sp vec = gc::As_unsafe(obj); // Why am I copying objects? //core::T_sp element = vec->rowMajorAref(index).as()->deepCopy(); return element;