SENPAI-Molecular-Dynamics / SENPAI

Molecular dynamics simulation software
https://senpaimd.org
GNU General Public License v3.0
126 stars 16 forks source link

Implement loadable models #10

Closed Chelsea486MHz closed 2 years ago

Chelsea486MHz commented 5 years ago

To run a simulatujion, SENPAI is given a modified .mol file containing an atom block and a bond block.

The atom block has a line for each atom, which contains:

The bond block contains a line for each bond, containing:

Such files take time to write. Actually, it takes more time making the damn file than running the simulation. Working with SENPAI is working with a simulator, not with a half-assed file format. From the beginning, SENPAI was meant to be a program that takes in a molecule and thermodynamical parameters and outputs a rendered simulation in the .xyz format.

As such, this format issue must be fixed. The first solution I had, a month ago, was to implement the full periodic table in model.h and model.c, have SENPAI read a pure MOLV2000 file, and figure out the other values by itself. The issue with this "solution" is that it forces the user to use a limited set of atom types that may not fit their use cases.

The proposed solution here is to have SENPAI read both a semi-pure MOLV2000 file, where only the atom symbol is changed to the desired atom type; and a model file. This would imply loading two files instead of one, and means considerable work.

However, the beauty of this solution is that SENPAI would be able to use existing peer-reviewed models, effectively making it more usable than it currently is, and possibly opening the way to rival other simulators in the future.

Kastakin commented 5 years ago

If the idea is to actually use a MOL v2000 as less modified as possible why not keep the original plan of having SENPAI figure out the parameters for "normal" atoms and add use some arbitrary symbols (i.e. X1, X2,...) that can be used to tell the program that that particular atom parameters has to be retrieved elsewhere like in an associated file? That way most normal use cases will not need to modify any MOL file while keeping the possibility of use custom atoms.

Chelsea486MHz commented 5 years ago

It would sure come as a clean solution, but I'd need some time to figure out how to do it cleanly. Maybe have SENPAI load up default parameters on startup, and overwrite some of them through some file or command or whatever.

This is a real dillema between keeping the program dead stupid and allowing the user to tune the parameters freely. A dillema that cannot be answered without some trial and error, IMO

Chelsea486MHz commented 3 years ago

Specs for the MDM file format to be implemented in SENPAI are available in Documentation/mdm-format.txt

Chelsea486MHz commented 2 years ago

Loadable models have been implemented.