Daniel Russel wrote: > As I was running in to issues converting units for handling various bits > of data I wrote some classes to help. I have one class for MKS units and > one for the KCal/Mol/Angstrom sorts of units that MD expects. And > methods to handle conversions between the two. Using them you can write > things like PicoJoules(1)/Meter(2) and get something with the right > units out and then call convert_to_kcal to convert it to the MD units. > Perhaps the latter unit should be called MDUnit or something.
I have no particular problem with any of this, except that the comments (not sure about the code though) seem rather confused about many of the units. I don't know what KCal and Mol are, for example - these should be kcal and mol, of course. And there are far better sources for fundamental constants than Wikipedia!
> It is written as C++ template classes but specific units can probably be > exposed to python. However I think Scientific Python already includes > this sort of thing, so it is probably not very useful.
Indeed. Certainly MMTK does.
Assuming a cleaned-up version of this patch is available, and nobody has further comments/suggestions, I can commit it later tomorrow.
Ben