Hello,
I have a question about the implementation of the Lennard Jones model driver: LJ__MD_414112407348_003.
I am modifying the model driver and am stuck on a C++ feature that I do not understand (and therefore cannot extend). I would appreciate any insight on what the intended functionality is as well as what the C++ feature is.
My question focusses on the function LENNARD_JONES_PHI that is defined here using a macro. I have 2 questions
- The function is being called with and without passing an argument in the same file (the without case uses a semi-colon in lieu of a double). I am aware of the variadic macros feature in C++ but this doesnt appear to be that, what is the actual feature?
- In the equation inside the macro there appears to be no math operator preceding the variable exshift just a blank between the variable and the closing paranthesis, I understand that its the shift parameter so it needs to be added, but how is that being achieved?
Apologies for asking C++ questions in here, but I thought it might be more appropriate than lets say stackoverflow. Let me know if anything above seems unclear.
Appreciate your help!
Best!
Aditya