MobleyLab/basic_simulation_training

Typo/grammar fixes/clarity issues to deal with for revisions

Closed this issue ยท 47 comments

From @vtlim in my group; we should add an acknowledgment/contributions spot for her when we fix these:

  • p.5, left column, bottom, "The rate coefficient kab..." is not a complete sentence. I think the word "which" here is superfluous.
  • p.6, left column, end of first paragraph, two periods after "e.g."
  • p.8, right column, there should be a period before the sentence "Coulombic interactions, including..."
  • p.13, left column, missing the word "Figure" in the sentence "The schematic below..."
  • p.15, right column, simple velocity rescaling paragraph, there's a typo that says "sample velocity rescaling"
  • p.16, right column, there are unnecessary parentheses around "Table 1"
  • p.16, right column, typo on the word simulations in the sentence "Such conditions correspond to..."
  • p.17, left column, the sentence starting with "These impacts from" took me a few re-reads to comprehend.
  • p.19, left column sentence starting with "More subtly" reads kind of odd
  • p.20, right column, I'm not sure what "order of operations" is referring to
  • p.20, right column, The sentence starting with "Second, even" uses the word "even" twice and is a bit confusing
  • p.21, left column, the sentence starting with "Unlike the original" mentions figure 6 twice maybe redundantly
  • p.23, the second heading should say "make critical decisions OF/FOR/ABOUT the system" (missing preposition)

Some general concepts that I didn't understand very well but maybe need to do my own reading, are:

  • what it means for entropy to quantify the width of the basin (p.6) (Resolved by #90 )
  • what the reason is for reducing 1-4 interactions (p.8)
  • many simulations use the Hamiltonian formulation but via the Newtonian eqns of motion? (p.3,15) (DLM: Seems outside of scope.)
  • why the opposite sign screening function is used for direct space in Ewald summation (p.21) (Resolved by #90)

I have some time to make changes today; will make a pull request when I'm done

Items from the review that I have not yet addressed:

  • P. 2, col. 2, top: "I don't see why this is particular to free-energy calculations, and not, say, transport properties."

  • P. 3, col. 2, bottom: This sentence was highlighted with no explanation: "These concepts
    play an important role in development and proper implementation of simulation methods. For example, a particularly straightforward check of the correctness of an MD code is to test whether energy is conserved."
    (DLM: I don't see how to fix this one since the sentence reads fine to me. So we'll need to not do this for now.)

  • P. 5, top list: do we want to add https://www.wiley.com/en-us/Thermodynamics+and+an+Introduction+to+Thermostatistics%2C+2nd+Edition-p-9780471862567? I haven't read it so I want another opinion before adding (DLM: I haven't read it and it is expensive; I'd want an endorsement from someone we know before adding it.)

  • p. 11, 2nd column, last sentence the reviewer added "Although outside the stated scope, a specific example here could be helpful. Perhaps one showing a large molecule with different types of carbon atoms having different force-field parameter assignments." (DLM: Won't address, outside of scope.)

  • p. 12, first column, middle, the reviewer highlighted our sentence "Since the momentum
    of the center-of-mass of the simulation box is conserved by Newtonian dynamics, the last particle is typically assigned a velocity to guarantee that the center-of-mass momentum is zero, preventing the simulation box from drifting" and wrote: "A less risky approach is to assign the velocities and then add a constant to all of them to zero the com momentum. Otherwise that last atom could end up with an abnormally large velocity."

  • p. 12, paragraph after last comment: "If many short trajectories are of interest (e.g., with transition path sampling), the velocity assignment is more important. For example, if a velocity is assigned with a component that violates a constraint (e.g., bond length), it will be zeroed out, potentially leading to a subtle systematic error."

  • p. 16, col 1, last sentence of "Langevin"--reviewer wrote "Wouldn't zero dampling reduce to the Andersen thermostat, due to F_random?" (DLM: The answer is no, see below. We clarified in the text.)

  • p. 17, col 1, end of paragraph starting "For the purpose..." the reviewer wrote "Something should be said about what is meant by "scaling", and how molecules are moved when the volume changed."

  • p. 20, col 1, 2/3 down, by the sentence "Some examples of these enhanced timestepping algorithms...", the reviewer wrote: "One should also ensure that the averages don't change (distinct from drift) with time step, particular when using a thermostat."

  • p. 21, Figure 7: "This could be a bit misleading in that the screened interactions start at a lower value at r = 1. The vdW line I assume has an arbitrary scale, so there's no need from them to start from different points." (Done)

  • p. 23, 2nd checkmark: "It is not advisable to do mu-P-T simulations. " (DLM: Removing this from the checklist; it seems we were overambitious in listing options.) and "For mixtures, consider semigrand or osmotic ensembles too". (DLM: done, as footnote -- not mainstream yet.)

Thanks!

Sorry, I missed these notifications. I will work on these this afternoon/evening.

I have checked off items that I have addressed (check boxes 5, 6, and 9) and pushed the changes to a commit in the hbmayes branch (hope that's alright).

For check box 3, I also have not read this book.

I'm voting to ignore check box 4 since we already talk about choosing force fields earlier in the document, and as the reviewer mentions, we can't possible stay within the scope while providing force field parametrization suggestions.

Fine/great by me!

Thanks, @hmayes and @JIMonroe ! I'll try and deal with more issues tonight and tomorrow.

OK, I got Vickie's changes dealt with except the issue on "many simulations use the Hamiltonian formulation but via the Newtonian eqns of motion?", which seems outside of scope (I don't see a quick/easy explanation). Shall I strike through that one, @hmayes and @JIMonroe ?

@EfremBraun - do you know the answer to this? "p. 16, col 1, last sentence of "Langevin"--reviewer wrote "Wouldn't zero dampling reduce to the Andersen thermostat, due to F_random?" I'm not familiar with details of how the random force is handled and whether it is exactly equivalent.

Update: Answered this myself; the answer is "no". The friction force and the random force are related by the fluctuation/dissipation theorem so the amount of each is coupled in order to retain correct properties. So this does NOT reduce to Andersen in the limit of 0 friction/noise; it just becomes constant energy Newtonian dynamics.

@samarjeet did you create the figure on decay of electrostatic interactions? I'm not seeing code for it in this repo; we need to generate an updated version of it with a different vertical axis scale. Can you do so, or provide code to re-generate? (Ideally both!)

@davidlmobley Yes, I can update it as well as attach the code as well. Let me do that asap.

@davidlmobley I have added the matlab script for the figure in temp_graphic_files. The figures currently shows only the functional form of the expressions but the reviewer is right in pointing out that the reader may get an incorrect impression about the relative values of vdw and direct component of ewald. As the charges or well depth will be specific, I had not used it while making the figure.

So, will it be better if I plot it again for a specific pair of atoms ? Or is there some better way of presenting it?

@samarjeet what would be best would be if you made the r=1 value be 1 for all of them, so that the thing being compared in the figure is ONLY how fast they decay.

I don't have matlab, so it would be great if you could make this change really quick.

I'll start addressing some of the remaining issues from
#89 (comment) in a fresh PR, #95 .

for this checkbox:
p. 16, col 1, last sentence of "Langevin"--reviewer wrote "Wouldn't zero dampling reduce to the Andersen thermostat, due to F_random?"

Not sure how we want to address this. But if the damping term is reduced to 0, both the noise term and the friction forces both go to zero, as they are both dependent on the damping factor.

So it is true that the Langevin thermostat as the damping approaches 0 transitions to microcanonical dynamics.

We should not have to edit that part. Unless it needs to be explained more?

Any thoughts?

@justinGilmer I am proposing adding a footnote that says that. I've taken a pass at this in #95.

Anyone know offhand why constant mu-P-T simulations would be inadvisable?

@justinGilmer I am proposing adding a footnote that says that. I've taken a pass at this in #95.

That looks great to me. Explains it succinctly.

The footnote looks good to me, too. This is probably too technical, but for the sake of completeness...

@justinGilmer is right that if the friction factor goes to zero, both the drag and random forces go to zero. However, if you look at certain discretized versions of this (like in the GROMACS manual), it looks to me like setting the friction factor to zero causes ONLY the drag term to drop out, leaving a random Gaussian kick satisfying the average kinetic energy at the given temperature being added to the velocity on every time step (see page 60 of the 2016.1 manual under "3.8 Stochastic Dynamics." This may be what the reviewer is referring to, but I could also be off in working things out in my head.

In other words, there may be a difference between the true Langevin equation and the discretized versions implemented in most packages.

@JIMonroe thanks. That sounds like it would be, er, potentially a problem with GROMACS/discretization then.

@JIMonroe @justinGilmer do you know anything about the "osmotic ensemble", and/or why not to do simulations at constant mu, P, T? (Or, in the case of the latter, who put them into the checklist?) I am not offhand finding much on either. On constant mu, P, T simulations I'm wondering if we just got overambitious in what we listed in the checklist?

This is one of the better discussions about mu-P-T ensembles I have found.

https://sourceforge.net/p/lammps/mailman/message/36293233/

However, I am not sure how best to explain this in the text. Or a good reference aside from this discussion and the wiki for the gibbs-duhem equation

Someone who is more knowledgeable about this may be able to shed more light on it.

I feel like it might have been just overambition, but I am not sure. We can go back and check the blame of the file to see who put it in though.

Seems like we should just strike that from the paper; I was worrying about expansion and phase transitions. I'll remove.

That just leaves the issue of osmotic ensemble.

Not completely sure, but it in mu-P-T all of you're fixed state variables are intensive. Without at least one extensive variable defining the ensemble, I think things get pretty unstable in terms of simulations pretty quickly.

A Google Scholar search for "osmotic ensemble" turns up only [297 hits]("osmotic ensemble"), all recent. While interesting, I think this is still a niche ensemble and not something that belongs in a basic simulation training document -- especially since we nowhere enumerate all ensembles which might be of interests; we focus on typical ones used in molecular simulation and don't have a separate section devoted to ensembles. So I think we need to skip over that one for now.

Ahh, but Allen & Tildesley has a good explanation of semi-grand canonical ensemble and it becomes clear to me on reading it that this has substantial overlap with the osmotic ensemble (number of particles is constant but identities can change). I think a FOOTNOTE in the checklist is the right thing as these are not common simulations yet.

All that's left in the checklist is the suggested reference to the thermo book by Callen. I am not familiar with this book, unfortunately. Thoughts?

Let me take a look.

(And of course we need @samarjeet 's update, unless you have matlab handy to do it for him.)

Yeah, I don't know that book. I updated above; let's not add the reference unless someone we trust specifically endorses it here. I don't want to be in a position we're effectively recommending that people buy a book that none of us are familiar with. We have to be able to defend our choices. "An anonymous reviewer suggested it" is not a great defense for recommending a purchase, in my opinion (a cynical person would argue that the reviewer recommended it because they were the author, perhaps.).

@samarjeet - I do have Matlab, but I'm not seeing a Matlab file in temp_graphic_files directory.

@samarjeet did you perhaps only put it in your directory locally, or put it in a branch?

(I'll be tied up for a while beginning now.)

@davidlmobley I have added the python version of code as well and the updated figure too. It's in the post_edits branch.

I am editing the line marked unclear by the reviewer in the Long range electrostatics section.

@samarjeet which line? I THINK we have already addressed all the issues.

Thanks for the code/plot; I'll get it merged in.

Thanks. That sounds good. The caption will have to be changed as well.

Can I update another line after the merge (not pointed out by reviewer) ? I had written in an earlier paragraph that attenuated direct space component decays faster than vdw, but I am not so sure about that after plotting the figure. It depends on the kappa value that is used. A larger kappa value means that greater portion is being handled in reciprocal space and vice versa. So, a direct comparison of vdw and direct-space-ewald without kappa would not be correct.

@EfremBraun - do you know the answer to this? "p. 16, col 1, last sentence of "Langevin"--reviewer wrote "Wouldn't zero dampling reduce to the Andersen thermostat, due to F_random?" I'm not familiar with details of how the random force is handled and whether it is exactly equivalent.

Update: Answered this myself; the answer is "no". The friction force and the random force are related by the fluctuation/dissipation theorem so the amount of each is coupled in order to retain correct properties. So this does NOT reduce to Andersen in the limit of 0 friction/noise; it just becomes constant energy Newtonian dynamics.

You are correct. It's pretty clear from the equations of motion of Langevin dynamics (https://en.wikipedia.org/wiki/Brownian_dynamics) that if you set gamma to 0, it just becomes NVT.

The footnote looks good to me, too. This is probably too technical, but for the sake of completeness...

@justinGilmer is right that if the friction factor goes to zero, both the drag and random forces go to zero. However, if you look at certain discretized versions of this (like in the GROMACS manual), it looks to me like setting the friction factor to zero causes ONLY the drag term to drop out, leaving a random Gaussian kick satisfying the average kinetic energy at the given temperature being added to the velocity on every time step (see page 60 of the 2016.1 manual under "3.8 Stochastic Dynamics." This may be what the reviewer is referring to, but I could also be off in working things out in my head.

I'm not too big a fan of this footnote. If I were the reader, I would be confused; I'd say to myself, "Why would anyone think that getting rid of damping would reduce the Langevin thermostat to the Andersen thermostat in the first place? The authors must be alluding to something that I'm not thinking of. What can it be?"

I think that we should just point out the reviewer's error in our response and leave the paper without the potentially confusing footnote.

@EfremBraun

I think that we should just point out the reviewer's error in our response and leave the paper without the potentially confusing footnote.

I'd be OK with that. My thought process was, though, that usually anytime ONE person has a particular question they are representative of a larger group of people who will have the same question, so it's best just to deal with it. Input from the rest?

@samarjeet

Can I update another line after the merge (not pointed out by reviewer) ? I had written in an earlier paragraph that attenuated direct space component decays faster than vdw, but I am not so sure about that after plotting the figure. It depends on the kappa value that is used. A larger kappa value means that greater portion is being handled in reciprocal space and vice versa. So, a direct comparison of vdw and direct-space-ewald without kappa would not be correct.

Yes. Please create a new branch based off of the latest master and propose edits in that branch and then do a PR.
(Note that your last edits were not based on the most recent version of the paper so we had to make adjustments to get them into the right version.)

@EfremBraun

I think that we should just point out the reviewer's error in our response and leave the paper without the potentially confusing footnote.

I'd be OK with that. My thought process was, though, that usually anytime ONE person has a particular question they are representative of a larger group of people who will have the same question, so it's best just to deal with it. Input from the rest?

Ah, now I see what confused the reviewer. The paper says, "Careful consideration must be taken when choosing the friction damping parameter," which implies that the stochastic term remains constant. I've just put in a pull request that corrects this misleading sentence, which also allows us to get rid of the footnote.

@EfremBraun - remove the footnote at the same time?

@EfremBraun your PR doesn't seem to have that commit yet; the only change is an updated reference. Is your change stuck in a branch?

Ah, @EfremBraun ; it was stuck in a branch, but I found it and it looked great, so I did a PR and merged it.

OK, we dealt with all of these in #99 #98 #97 #96 #95 and #94 . Closing.