Skip to content
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

Make units of force constant configurable #16

Open
tgmaxson opened this issue Aug 2, 2024 · 2 comments
Open

Make units of force constant configurable #16

tgmaxson opened this issue Aug 2, 2024 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@tgmaxson
Copy link

tgmaxson commented Aug 2, 2024

What are the units of the force constant? From reading the src I cannot tell if this should be in kcal/mol or kT units etc.

It would be nice if we could supply the value of kB on the CLI such that we can use whatever unit we would like (or have a table to lookup from such as https://en.wikipedia.org/wiki/Boltzmann_constant#Value_in_different_units)

@tgmaxson
Copy link
Author

tgmaxson commented Aug 2, 2024

Nevermind, I found the unit. Can we make this configurable? I am not familiar with Rust in general but I think this is an easy change.

static k_B: f64 = 0.008_314_462_1; // kJ/mol*K

@dnlbauer
Copy link
Owner

dnlbauer commented Aug 15, 2024

You're correct that the force constant is currently set in kJ/mol*K. This was what I typically worked with when writing the tool.

One thing to consider is that if we change the constant to be in any unit, the meaning of temperature also changes from "Temperature is always in Kelvin" to "in the format of k_B". But this is just a semantic issue.

If someone is interested in submitting a pull request to implement this feature, it should be a relatively simple change. kJ/mol*K should stay the default value to be backward compatible, though.

@dnlbauer dnlbauer changed the title Units of Force Constant Make units of force constant configurable Aug 15, 2024
@dnlbauer dnlbauer added the enhancement New feature or request label Aug 15, 2024
@dnlbauer dnlbauer added the help wanted Extra attention is needed label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants