The partition function (normalization coefficient) is easy to calculate through:
Z = Σi(e-βHi)
where the summation is over all possible combinations of DNA and proteins; Then the probability of i-th combination is given by:
pi = 1/Z * e-βHi
(Protein 1's) mg, Vg, binding constant, concentration (Protein 2's) mg, Vg, binding constant, concentration, ... (cycling), target n(th segment of DNA), target g(th protein);
g++ -I/opt/homebrew/Cellar/boost/1.78.0_1/include -I/opt/homebrew/Cellar/eigen/3.4.0_1/include *.cpp -std=c++14 && ./a.out 4 7 12.8 10 12 13 11.3 10 2 1 59.7 10 3 0
g++ *.cpp -I /usr/include/eigen3 -std=c++14 -lstdc++fs && ./a.out 4 7 12.8 10 12 13 11.3 10 2 1 59.7 10 3 0
sudo chown -R yaminocellist:yaminocellist Lattice_model