Giter Club home page Giter Club logo

dftcxx's People

Contributors

ifilot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dftcxx's Issues

Quasi-infinite loop

Running the program for certain molecules (e.g. CO) results in slight oscillations in the computed energies in the SCF procedure. As convergence is not achieved, the program keeps looping infinitely, so I suggest imposing a maximum number of iterations to prevent this behaviour.

spherical_harmonics.cpp buffer overflow?

Hi,

I'm trying to compile the project on windows and I noticed something:

In double SH::legendre (int n, double x) you have at line 58:

double v[n];

That would allow using indices for v from 0 to n-1. Despite that, v[n] is written and returned.

The simple solution would be: double v[n + 1]; (as you already have in SH::legendre_p).

Another issue is that the code as it is creates problems when compiling with VisualC++ (error because n is not a constant), The solution would be:

double *v = new double[n+1];

and just before return:

    const double val = v[n];

    delete[] v;

    return val;

and similarily in SH::legendre_p

PS Nice work. How long did it take you to implement it? I'm thinking of adding DFT to my Hartree-Fock program for molecules, I did implement some DFT code before, but with plane-waves basis: https://compphys.go.ro/dft-for-a-quantum-dot/

Adrian

Eigen::SelfAdjointEigenSolver

Replace all instances of the EigenSolver with SelfAdjointEigenSolver. The latter ensures that the coefficient matrix is unitary, the diagonalization algorithm is faster and all eigenvalues and eigenvectors are automatically sorted.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.