diff --git a/modules/qa/pymod/export_interaction.cc b/modules/qa/pymod/export_interaction.cc index 6e6e119f0a6b2a2d2a9fad3662b6815516b37935..dfc2636cb3cb84503e7b01864f36fdbfe4c54cbb 100644 --- a/modules/qa/pymod/export_interaction.cc +++ b/modules/qa/pymod/export_interaction.cc @@ -237,7 +237,7 @@ void export_Interaction() .def("SaveToFile", &InteractionStatistics::SaveToFile, args("file_name")) .def("LoadFromFile", &InteractionStatistics::LoadFromFile).staticmethod("LoadFromFile") .def("RepairCbetaStatistics", &InteractionStatistics::RepairCbetaStatistics) - .def("isCbetaStaistics", &InteractionStatistics::isCbetaStaistics) + .def("IsCBetaOnly", &InteractionStatistics::IsCBetaOnly) ; class_<AllAtomPotentialOpts>("AllAtomPotentialOpts", init<>()) diff --git a/modules/qa/src/all_atom_potential.cc b/modules/qa/src/all_atom_potential.cc index 348880447a93c9f8530bc1a4b65a146f809e2d72..606d74d2aecafa12d05e41e354b5ef863fd5251b 100644 --- a/modules/qa/src/all_atom_potential.cc +++ b/modules/qa/src/all_atom_potential.cc @@ -153,36 +153,25 @@ AllAtomPotentialPtr AllAtomPotential::LoadFromFile(const String& filename) return all_atom_p; } - -float AllAtomPotential::GetTotalEnergy(mol::EntityView view, mol::EntityView target_view) +float AllAtomPotential::GetTotalEnergy(mol::EntityView view, + mol::EntityView target_view) { AllAtomPotentialCalculator c(energies_, options_, target_view); mol::EntityHandle e=view.GetHandle(); view.Apply(c); - interaction_counts_member_=c.GetEnergyCounts(); + interaction_counts_=c.GetEnergyCounts(); return c.GetEnergy(); } -float AllAtomPotential::GetEnergy(atom::ChemType type_a, atom::ChemType type_b, float distance) -{ - return energies_.Get(type_a, type_b, distance); -} - float AllAtomPotential::GetTotalEnergy(mol::EntityView view) { AllAtomPotentialCalculator c(energies_, options_, view); mol::EntityHandle e=view.GetHandle(); view.Apply(c); - interaction_counts_member_=c.GetEnergyCounts(); + interaction_counts_=c.GetEnergyCounts(); return c.GetEnergy(); } - -int AllAtomPotential::GetEnergyCounts() const { - return interaction_counts_member_; -} - - void AllAtomPotential::SetSequenceSeparation(int seq_sep) { options_.sequence_sep=seq_sep; } @@ -258,7 +247,7 @@ void AllAtomPotential::Fill(const InteractionStatisticsPtr& stats) // potential is only calculated for Cbeta atoms: // copy the potential for Calpha (Calphas are selected if // Cbetas are not present) - if (stats->isCbetaStaistics() == true) { + if (stats->IsCBetaOnly() == true) { //check if Cbeta (has counts) and not Glycin-Calpha if (t3 != 0) { if (i==3) { diff --git a/modules/qa/src/all_atom_potential.hh b/modules/qa/src/all_atom_potential.hh index 81beef95d7a1bf50168aa309c8865789035a38bd..5f0e15b4e4691090396088435a17f11d8e6802b1 100644 --- a/modules/qa/src/all_atom_potential.hh +++ b/modules/qa/src/all_atom_potential.hh @@ -76,8 +76,11 @@ public: /// \brief extract energy of a specific interaction /// (for plotting pseudo Lennard-Jones potential). - float GetEnergy(atom::ChemType type_a, atom::ChemType type_b, float distance); - + float GetEnergy(atom::ChemType type_a, atom::ChemType type_b, + float distance) + { + return energies_.Get(type_a, type_b, distance); + } /// \brief calculate all-atom interaction between two entities. /// Two entities need to be provided: /// the atoms for which the energy should be derived and @@ -85,7 +88,7 @@ public: float GetTotalEnergy(mol::EntityView view, mol::EntityView target_view); /// \brief retrieve total number of interactions (for normalisation) - int GetEnergyCounts() const; + int GetEnergyCounts() const { return interaction_counts_; } /// \brief set different seqeunce separation than used for training void SetSequenceSeparation(int seq_sep); @@ -102,7 +105,7 @@ private: AllAtomPotentialOpts options_; AllAtomEnergies energies_; mol::EntityView target_view_; - int interaction_counts_member_; + int interaction_counts_; }; }} diff --git a/modules/qa/src/interaction_statistics.hh b/modules/qa/src/interaction_statistics.hh index a1e8eeb48e1c2eee1efb969eb74a17987968335f..070346c7d76b4a83701c3b6cdebb862b743adb86 100644 --- a/modules/qa/src/interaction_statistics.hh +++ b/modules/qa/src/interaction_statistics.hh @@ -111,7 +111,7 @@ public: virtual bool VisitResidue(const mol::ResidueHandle& r); virtual bool VisitAtom(const mol::AtomHandle& a); - inline bool isCbetaStaistics() {return isCbetaStatisticsFlag_;} + inline bool IsCBetaOnly() {return isCbetaStatisticsFlag_;} private: diff --git a/modules/qa/src/packing_potential.hh b/modules/qa/src/packing_potential.hh index dec0054f672319ab71d3ab108a907b18a46b1c9b..df49d006c4d7a3774b1646cce3f67496243c0afc 100644 --- a/modules/qa/src/packing_potential.hh +++ b/modules/qa/src/packing_potential.hh @@ -84,7 +84,7 @@ public: /// /// See documentation for PackingStatistics::Extract() Real GetTotalEnergy(const mol::EntityView& view, - const mol::EntityViewList& views); + const mol::EntityViewList& views); int GetEnergyCounts(); @@ -109,7 +109,7 @@ private: // used to calculate total energy... mol::EntityView view_; mol::EntityViewList views_; - Real energy_; + Real energy_; int energy_counts_; }; diff --git a/modules/qa/src/torsion_statistics.hh b/modules/qa/src/torsion_statistics.hh index 15f20089a5d8e7950621d79c347c612bbd0005d0..74ad15562e4a504ebd20dfa83645a7f67002ce44 100644 --- a/modules/qa/src/torsion_statistics.hh +++ b/modules/qa/src/torsion_statistics.hh @@ -70,8 +70,8 @@ public: Real next_phi_angle, Real next_psi_angle) const; uint64_t GetCount(Real prev_phi_angle, Real prev_psi_angle, - Real central_phi_angle, Real central_psi_angle, - Real next_phi_angle, Real next_psi_angle) const; + Real central_phi_angle, Real central_psi_angle, + Real next_phi_angle, Real next_psi_angle) const; uint64_t GetCount(const AminoAcidSet& central_aa) const;