Skip to content

Commit

Permalink
dont calculate bending pot if ubend==0 . corrected number of chars fo…
Browse files Browse the repository at this point in the history
…r k string
  • Loading branch information
JohannHansing committed Mar 17, 2017
1 parent c051b1d commit c4bfc44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ void CConfiguration::calcBeadInteraction(){//TODO pep
_uSpring += utmp;
utot += utmp;
}
if (j==i+2){
// BEND
if (j==i+2 && _uBend!=0){
if (rij==0) rij = sqrt(rijSq);
addBendingPot(rij, utmp, frtmp);
utot += utmp;
Expand Down
2 changes: 1 addition & 1 deletion headers/SingleParticleSimulationPep.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ string createDataFolder(string trigger, double timestep, double simtime, double
double particlesize, bool steric, bool ranU, double dvar, double polydiam, string peptide, double uDebye, double uBend){
//NOTE: Maybe I can leave out dt, as soon as I settled on a timestep
//NOTE: As soon as I create input-list with variables, I must change this function
char range[5];
char range[10];
sprintf(range, "%.3f", potRange);
//In the definition of folder, the addition has to START WITH A STRING! for the compiler to know what to do (left to right).
string folder = "sim_data";
Expand Down

0 comments on commit c4bfc44

Please sign in to comment.