ls1-MarDyn is a massively parallel Molecular Dynamics (MD) code for large systems. Its main target is the simulation of thermodynamics and nanofluidics. ls1-MarDyn is designed with a focus on performance and easy extensibility.
Describe the bug
The mixing rules are not really implemented user-friendly and could easily be set wrong by the user since the exact order matters.
Also, there is something more to do, see here.
The variable _mixingrules is not really used but dmixcoeff is used instead. The latter is processed in Comp2Param.cpp but as the mixing coefficients xi and eta are just pushed back in the vector, the specified cid1 and cid2 are not considered in the processing.
A good solution would clean up everything and use something better than the vector of doubles (dmixcoeff) but an vector of mixing rules maybe (_mixingrules).
An easy solution would be to very strictly restrict the user input to match the processing algorithm.
To Reproduce
Steps to reproduce the behavior:
Enable this line to print xi and eta in Comp2Param.cpp
Use at least 3 components to have more than 1 mixing rule
Set mixing rules xi and eta in xml to different values for identification of single rules
Set order to something like: cid1="2" cid2="3" and cid1="2" cid2="1" and cid1="1" cid2="3"
Observe if xi and eta processed in Comp2Params.cpp match values of xml (Hint: They don't)
This issue was already addressed before, see
73
74
75
However, this description might be a bit cleaner and now up to date.
There was an attempt for a fix #76 but not merged...
Describe the bug The mixing rules are not really implemented user-friendly and could easily be set wrong by the user since the exact order matters. Also, there is something more to do, see here.
The variable
_mixingrules
is not really used butdmixcoeff
is used instead. The latter is processed inComp2Param.cpp
but as the mixing coefficients xi and eta are just pushed back in the vector, the specifiedcid1
andcid2
are not considered in the processing.A good solution would clean up everything and use something better than the vector of doubles (
dmixcoeff
) but an vector of mixing rules maybe (_mixingrules
).An easy solution would be to very strictly restrict the user input to match the processing algorithm.
To Reproduce Steps to reproduce the behavior:
Comp2Param.cpp
cid1="2" cid2="3"
andcid1="2" cid2="1"
andcid1="1" cid2="3"
Comp2Params.cpp
match values of xml (Hint: They don't)This issue was already addressed before, see
73
74
75
However, this description might be a bit cleaner and now up to date. There was an attempt for a fix #76 but not merged...