molovol / MoloVol

MoloVol is a free, cross-plattform, scientific software for volume and surface computations of single molecules and crystallographic unit cells.
https://molovol.com
MIT License
22 stars 4 forks source link

Convert volumes and surface areas from nanoscale to macroscale #90

Closed rlavendomme closed 3 years ago

rlavendomme commented 3 years ago

Current status

As of now, the volume and surface area values are given for single molecules or unit cells.

Issue

It is simple but not straightforward to compare data calculated with MoloVol on the nanoscale and values measured on the macroscale.

Proposed change

Add volume and surface area values per gram in the report file. For this, the molecular weight needs to be known so the element radii file needs to be updated with elements weight. The radii file should be renamed elements (or elements_properties). Then the following formulas can be applied:

V [cm^3/g] = V [Å^3] * Navogadro [mol^-1] * 10^-24 [cm^3/Å^3] / M [g/mol]
S [m^2/g] = S [Å^2] * Navogadro [mol^-1] * 10^-20 [m^2/Å^2] / M [g/mol]

Improvement

It could prove useful to get volume and surface area per gram of material, especially to compare to experimental data (e.g. gas sorption for porous solids).

jmaglic commented 3 years ago

Changes required off the top of my head:

Should this also be an output in the GUI or should this be limited to the result file? I wouldn't want to risk including clutter to the GUI, but if it makes sense, then it should of course be included in the GUI. Maybe there could be a switch to change values back and forth?

I prefer the name "elements.txt".

rlavendomme commented 3 years ago

Should this also be an output in the GUI or should this be limited to the result file?

I don't think this information is required in the GUI which summarizes the main results without further processing. The report file is there to give detailed results.

I'll open a branch for that feature once I find a reliable consistent source for all elements' molar mass.

jmaglic commented 3 years ago

Alright. Please make sure you use getResourcesDir() in misc.cpp to access the directory in which the elements.txt file is located. It may be good to add another function directly inside misc.cpp that's called something like "getElementFilePath()".

I suggest creating a std::map inside the model class, with which to look up mass using the element symbol as key.