From: Dariusz Murakowski Date: Fri, 24 Apr 2015 14:29:53 +0000 (-0400) Subject: Save mapping of Potts state to amino acid as well. Virus object has no access though. X-Git-Url: http://src.murakowski.org/?a=commitdiff_plain;h=9a2cc041651f017ab6cbc9bbf1637196d2b63854;p=VirEvoDyn.git Save mapping of Potts state to amino acid as well. Virus object has no access though. --- diff --git a/ham_ss.cpp b/ham_ss.cpp index 94232d7..df392f3 100644 --- a/ham_ss.cpp +++ b/ham_ss.cpp @@ -5,6 +5,7 @@ #include #include #include +#include // rotate #include "ham_ss.h" #include "seqTools.h" @@ -201,6 +202,17 @@ void PottsHamiltonian::getSeq2State(const std::string &FILENAME) fclose(input); + + for (size_t i=0; i(Schar[i].size())); + std::vector last = state2aa.back(); + for (size_t j=0; j > aa2state; for (unsigned i=0; i > aa2state; + std::vector > state2aa; PottsHamiltonian(const std::string &couplingsfile, const std::string &seq2stateFile); PottsHamiltonian() : bh(1.0), bJ(1.0) { } diff --git a/ss.cpp b/ss.cpp index 6f73581..b3ea4ad 100644 --- a/ss.cpp +++ b/ss.cpp @@ -224,6 +224,7 @@ void print_species_traj(double t, const Species_parray &print_spec, bool verbose for (; it != end; ++it) { //std::cout << ' ' << it->second // << '(' << aaseq2str(it->first.aa_seq) << ')'; + // unfortunately, the virus does not know about the Hamiltonian's state2aa, so we can't print the "internal" representation in a useful manner. TODO.... std::string s = aaseq2str(it->first.aa_seq); if (aa_seqs.count(s)==0) aa_seqs[s] = it->second; // new sequence else aa_seqs[s] += it->second; // add to existing pool