dftd4 / cpp-d4

C++ port of DFT-D4
GNU Lesser General Public License v3.0
7 stars 9 forks source link

Real-space cutoffs #9

Closed marvinfriede closed 1 year ago

marvinfriede commented 1 year ago

Real-space cutoffs for the coordination number and the dispersion energy are implemented to (finally) achieve full consistency with the total dispersion energy of the Fortran implementation.

marvinfriede commented 1 year ago

Let's provide all cutoff values in the constructor rather than having to construct an incomplete object and adding the attributes with setters.

I don't understand that part. The constructor writes the default values to all members here. The setters are just for changing it (required within a test).

Also, no C-style casting in C++.

So just multiplying by 1.0?

awvwgk commented 1 year ago

I don't understand that part. The constructor writes the default values to all members here. The setters are just for changing it (required within a test).

Why not have the tests recreate the object with the correct values in the constructor then? Or directly setting the value of the members as they are public.

So just multiplying by 1.0?

https://en.cppreference.com/w/cpp/language/static_cast

marvinfriede commented 1 year ago

I don't understand that part. The constructor writes the default values to all members here. The setters are just for changing it (required within a test).

Why not have the tests recreate the object with the correct values in the constructor then? Or directly setting the value of the members as they are public.

Oh. I forgot about the members being public...

marvinfriede commented 1 year ago

Can I merge this?