-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force calculation suggestion #30
Comments
Thanks for the advice, I'll add it to the to-do list. |
It is probably worth noting that the degrees of freedom are only 3*N, where N is number of particles, for the Andersen thermostat. DF are different for stochastic or deterministic thermostats, and this rippled to kinetic energy. The difference is small, but nonetheless, worth accounting for. |
Thanks, let me know as you see anything else, it's useful. |
I think @BradenDKelly suggestion would enhance the performance and simplicity of the api. The suggested table can also have a r_cutoff field for each pair of particle types. Then something like negative values can be set to it to exclude that pair of particle types from force calculation (or neighbor searching). That's the method that HOOMD-Blue uses. |
I think it's a good idea but will wait to see how the GPU kernel work (#60) progresses as this may require a refactor of other parts of the API too. |
I was just looking through the Lennard-Jones force calculations and noticed that every time you calculate the force between two atoms, you are calculating the mixing rules
Given the simplicity of the force calculation, these two square roots likely are adding a considerable amount of flops to the simulation. Typically simulation codes will precalculate the mixing rules and then simply look up the necessary sigma and epsilon, i.e.,
I do not know if type is available, but, incorporating it into the atom struct so that you can use this parameter lookup table, will likely speed up the calculation a reasonable amount. The type would be an integer, so it should be
isbits
true and so shouldn't interfere with CUDA/GPU. This will also make the structures lighter since only type needs to be saved per atom, and not epsilon and sigma (also, other force-fields, such as EXP-6, have more parameters so you save even more with them).Also, usually the size parameters use the Lorenz mixing rule i.e., are
σ = (atom_i.σ + atom_j.σ) / 2
It would be good to add the feature allowing the user to select the mixing rules to use for each parameter type.
The text was updated successfully, but these errors were encountered: