Closed frobnitzem closed 4 years ago
I was thinking about the energy computation mismatch and realized it might be giving answers I didn't expect if the Lennard-Jones energy is shifted at the cutoff. I'll try and resolve this over the weekend.
It looks like the new src/cabanamd.h
gets inheritance backward, since class CbnMD : public CabanaMD
, where the CabanaMD
contains top-level callable methods and commandline garbage.
class CabanaMD
{
public:
int nsteps;
virtual void init( InputCL cl ) = 0;
virtual void run() = 0;
virtual void dump_binary( int ) = 0;
virtual void check_correctness( int ) = 0;
};
Usually, top-level stuff calls into a library that does not deal with I/O unless absolutely necessary. I'd rather not transfer the ctor/dtor over to CbnMD
.
This test for neighboring atoms in a lattice seems to not work. Using:
gives
Increasing the cutoff gives larger magnitude energies, but never as large as -1.9.
Perhaps its in the way the init() function is being used here, but I've been over it several times and it appears to be working.