Code Monkey home page Code Monkey logo

cppdft's Introduction

Getting Started

To build

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j4

to run

export OMP_NUM_THREADS=8
./cppDFT ../default.inp

requirement

  1. cmake 2.8.6 or above
  2. c++11 compatible compiler
  3. eigen3 include directory saved in EIGEN3_INCLUDE_DIR environment variable

Class Structure

Particle Management

  • Particle
  • ParticlePool
  • ParticleSet

A particle is basically a collection of attributes such as posiotion, velocity, acceleration, mass and charge. A ParticlePool contains physical particles and is responsible for their memory allocation, deallocation and initialization. A ParticleSet maintains a list of pointers to the particles of interest.

The idea is to have a "heavy" object ParticlePool that manages memory allocation and then have mutiple "light" objects ParticleSet to manipulate the data. A typical starting point is

ParticlePool pPool(8); 
pPool.initCubicPositions(1.0);
ParticleSet gPset(pPool.myParticles());

which:

  1. initialize 3 particles at the origin
  2. call an initialization method to redistribute the particles - most simulations don't allow two particles at the same position
  3. allow a particle set to control some particles in the pool (partial pool control is not yet implemented, so all particle sets are global particle sets at the moment)

Basis

  • PlaneWave
  • Gaussian

A basis function takes a position and returns a value

BasisSet

A basis set is simply a collection of basis functions with some methods to create, destroy and access these basis functions.

Function

  • Density
  • ExternalPotential
  • HartreePotential

A function, like basis, also takes a position and returns a value. However, most functions need to be initialized as a linear combination of basis functions.

cppdft's People

Contributors

paul-st-young avatar jyotianeja avatar

Stargazers

 avatar Xiaoliang Pan avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

yidapa rkalescky

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.