ECP-copa / CabanaMD

Molecular dynamics proxy application based on Cabana
Other
19 stars 14 forks source link

Single Unit Test #35

Closed frobnitzem closed 4 years ago

frobnitzem commented 4 years ago

This test for neighboring atoms in a lattice seems to not work. Using:

./unit_test/LatNbrs sc 1.5 1.5001

gives

Atoms: 1000 1000
Energy = -0.000347342
Lattice Energy = -1.92202 per atom

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.

frobnitzem commented 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.

frobnitzem commented 4 years ago

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.