When simulation atoms, molecules, colloids, autc., are there programs that define each interacting unity as an object in the OOP sense?
In my own case, I've been simulating magnetic nanoparticles in colloidal dispersion in Fortran, but I have many arrays that are unrelated in the code for each attribute of the nanoparticles. For instance, for 100 nanoparticles, I would have the arrays r(3,100) for 3D position, m(3,100) for 3D magnetic moments, xi(100) for adsorbed molecule surface density, etc.
I started my code using Fortran 77 compilers, so I didn't use the TYPE feature of Fortran 2003 that would allow me to put all those arrays inside the same type.
However, I've been using Java a lot these times, so I wondered if I would better define each magnetic nanoparticle as an object. So I would also define methods "move", "rotate", etc. in the nanoparticle class. I am not sure about how I would compute the pair interaction itself. I don't see how to define it as object class methods... I guess I would have to do it in the "controller" layer, not in the "model" layer (using MVC paradigm).
I only hesitate in making this new program because I suspect that defining my nanoparticles as objects would make simulations a lot slower, however beautiful the code would look to me. But if there are other programs that define pair interaction unities that way, there will probably be good reasons to do so and I won't be alone in that... :-)