Giter Site home page Giter Site logo

llnl / qball Goto Github PK

View Code? Open in Web Editor NEW
45.0 18.0 22.0 98.04 MB

Qball (also known as qb@ll) is a first-principles molecular dynamics code that is used to compute the electronic structure of atoms, molecules, solids, and liquids within the Density Functional Theory (DFT) formalism. It is a fork of the Qbox code by Francois Gygi.

License: GNU General Public License v3.0

C 2.24% C++ 74.54% Makefile 1.66% Shell 0.41% Perl 7.51% Fortran 8.80% M4 1.93% HTML 2.91%
qbox dft tddft mpi cpp c-plus-plus molecular-dynamics simulation

qball's Introduction

Qball

Installing

To compile Qball we use a GNU Autools procedure:

  1. Generate the configure script (you need autoconf and automake).
autoreconf -i
  1. Now you need to determine how to run the configure script. Since Qball depends on some non-standard libraries you might need to set some environment variables and to add some flags to tell qball where to find those libraries.
Environment variable Description Note
CC C compiler Default is mpicc
CXX C++ compiler Default is mpic++
FC Fortran compiler Default is mpif90. Used only to detect Fortran libraries.
CFLAGS C compiler flags
CXXFLAGS C++ compiler flags
FCFLAGS Fortran compiler flags Used only to detect Fortran libraries.
LDFLAGS Flags to add to the linker
LIBS Extra libs add to linking
LIBS_BLAS Compilation flags to add the blas library
Flag Value Note
--prefix= installation directory default is /usr/local
--with-fftw3-prefix= path where fftw3 is installed
--with-fftw2-prefix= path where fftw2 is installed
--with-essl-prefix= path where the IBM ESSL library is installed
--with-blas= path where the Blas library file is located you can also use LIBS_BLAS
--with-lapack= path where the lapack library file is located
--with-blacs= path where the blacs library file is located you can also pass the location of scalapack
--with-scalapack= path where the scalapack file is located

For example, for a Blue Gene/Q system, you configure script might look something like this:

QBALLPREFIX=/usr/local/
QBALLDEPS=$QBALLPREFIX/dependencies/
export CC=mpixlc_r
export CXX=mpixlcxx_r
export FC=mpixlf95_r
export LIBS_BLAS="-L/usr/local/tools/essl/5.1/lib/ -lesslsmpbg"
export LIBS_BLACS="-lmpiblacs"
export LDFLAGS="-qsmp=omp"
export CFLAGS="-O3 -qsmp=omp -qarch=qp -qtune=qp"
export CXXFLAGS="$CFLAGS -qlanglvl=extended0x"
export FCFLAGS=$CFLAGS" -qxlf90=autodealloc -qessl -I$HOME/$xarch/fftw-3.3.4/include"
./configure --with-essl-prefix=/usr/local/tools/essl/5.1/ \
  --with-lapack=$QBALLDEPS/lib/liblapack.a --with-blacs=$QBALLDEPS/lib/libscalapack.a --prefix=$QBALLPREFIX
  1. Run the configure script with the necessary flags:
./configure --prefix=... 
  1. Now we are ready to build the code:

    make
    make install
    

Contact Erik Draeger ([email protected]) or Xavier Andrade ([email protected]) with any questions or problems.

Running

To run Qball, one needs an input file (.i), a coordinate file (.sys) and pseudopotential file(s) (.xml). Input examples can be found in the examples/ directory.

The input file can be specified either as an argument or as stdin to qball, e.g.

srun -n 16384 qball gold.N992.i > gold.N992.out

srun -n 64 qball < test.i > test.out

Release

Qball is licensed under the terms of the GPL v3 License.

LLNL-CODE-635376

qball's People

Contributors

akononov avatar alfc avatar bhatele avatar correaa avatar dillonyost avatar draeger1 avatar ianlee1521 avatar janeelizabeth avatar xavierandrade avatar xorjane 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

Watchers

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

qball's Issues

Ability to read in a potential defined on a grid in an HDF5/csv format

Dear all,

I have a potential generator written in Python that writes this potential to disk. I would like to read in this potential to QBox and perform a self-consistent calculation with N electrons. Could someone tell me:

  1. If this is currently possible.
  2. If it would be manageable to implement.

Thanks,
Kevin

Calculation aborts after 100 iteration

The tddft run aborts after 100 iterations with the message:
"qball: SlaterDet.cc:269: void SlaterDet::resize(const UnitCell &, const UnitCell &, double, int): Assertion `maxlocal != 0' failed."

The files and restart folder are also not saved. How can I fix this please.

FORKTD ignoring second argument of run

Simulations with wave_wf = FORKTD give identical results even though second parameter of run is different.

for example:
set wf_dyn FORKTD
set TD_dt 0.001 atomictime
run 1 1
or
run 1 10
would give identical results

in both cases if I grep for etotal it will show only one etotal_int tag per run.

Parameter 4 was incorrect on entry to ZLACPY

Qball in Quartz is giving this strange message, it looks like Lapack is called with the wrong flags (but still runs).

  <etotal_int scf_iter="199">   1855.08956212 </etotal_int>
  <eigenvalue_sum> 537.19408940 </eigenvalue_sum>
  <!-- Anderson extrapolation: theta = -0.12079958 ( using -0.12079958 ) -->

Intel MKL ERROR: Parameter 4 was incorrect on entry to ZLACPY.

Intel MKL ERROR: Parameter 4 was incorrect on entry to ZLACPY.

Intel MKL ERROR: Parameter 4 was incorrect on entry to ZLACPY.

This is the input:

set force_complex_wf ON
set nrowmax 32
54_LDA.sys                                     # load system
set xc LDA
set ecut 30 rydberg
set wf_dyn PSDA
set ecutprec 4 rydberg
set nempty 30
set smearing fermi
set smearing_width 350 kelvin
set charge_mix_coeff 0.6
randomize_wf
set threshold_scf 1e-6 4
status
run 0 200 5

This are related links:
https://software.intel.com/en-us/mkl-developer-reference-fortran-2018-beta-lacpy
https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/299717

It seems that maybe a matter of recompiling qball with a more recent version of MKL.

Ground state calculations failing with multithreading on cab

Calculated energies seem to explode (<etotal> grows exponentially) whenever the number of threads per task is greater than 1, at least on cab. Setting OMP_NUM_THREADS to 1 via export OMP_NUM_THREADS=1 avoids the issue.

The input script we were using was:

set ecut 45

set cell 15.0 0.0 0.0 0.0 15.0 0.0 0.0 0.0 15.0
species H H_HSCV_PBE-1.0.xml
atom H1 H 1.508729 0.441434 0.259102

set force_complex_wf ON
set xc PBE
set ecutprec 8.0

randomize_wf
run 0 500

quit

Continuation run fails when using k-points

When I try to continue a simulation that has more than 1 k-point, the program exits with a segfault just after having loaded the save states or hangs and does nothing (running on BlueGene).

################## First run (this works fine): ##############
set cell 10.0 0.0 0.0 0.0 10.0 0.0 0.0 0.0 10.0

species Ni Ni_HSCV_LDA-1.0.xml
species Cr Cr_HSCV_LDA-1.0.xml

atom Ni0 Ni 0.0 0.0 0.0
atom Cr1 Cr 0.0 3.5 3.5

set ecut 50 Ry
set nempty 32

set nkpoints 4
set nparallelkpts 1

kpoint 0.00 0.00 0.00 1.000 crystal
kpoint 0.50 0.00 0.00 1.000 crystal
kpoint 0.00 0.50 0.00 1.000 crystal
kpoint 0.00 0.00 0.50 1.000 crystal

run 0 10 10
status

save -dump wf/states
savesys wf/sys

################## Second run (segfaults or hangs): ##############
wf/sys
set ecut 50 Ry
set nempty 32

set nkpoints 4
set nparallelkpts 1

kpoint 0.00 0.00 0.00 1.000 crystal
kpoint 0.50 0.00 0.00 1.000 crystal
kpoint 0.00 0.50 0.00 1.000 crystal
kpoint 0.00 0.00 0.50 1.000 crystal

load -dump wf/states

run 0 10 10

save -dump wf/states
savesys wf/sys

############################################################
The program hangs/segfaults usually at following output lines

ChargeDensity: vbasis = 48 48 48, resize to 56 56 56

Compilation with make is overdependent

Minimal modifications to single source files forces the recompilation of the whole code with make.
For example a single modification to CurrentDensity.C makes the complete code to recompile.

How to include antiproton in Qball?

Hello,

I would like to do a stopping power calculation of an antiproton in solid material using Qball. Please, could you tell me how to get the pseudo-potential and the command for that?

Thanks in advance for your help.

Units in Qball

What are the units for the following parameters in Qball?

Force is in N?
Energy in Rydberg or a.u.?
Stopping power in eV/A?

Documention for changed commands/variable

Not all commands and variables in Qball match with those in Qbox. So, is there any documentation of all differences? If not, I can help

Example, I don't understand the second argument of "threshold_scf"

Make units on energy inputs/outputs consistent, or at least document

Right now the user specifies ecut and ecutprec in Rydberg. Energies included in the output such as <etotal> are given in eV, but units are not specified. Internally the code works with hartrees.

We should minimally tell the user explicitly that output energies are in eV. It may also be nice to allow the user to specify the units for inputs/outputs.

Automatic kpoint generation

It would be awesome if we provided a script or function that automatically generated kpoints for a user-specified mesh.

continuation of a simulation

Hello,
I run a simulation for the ground state which is not converged, is there a possibility to continue the simulation using a restart command?

Charged defedcts with qball

Hello,

Am new to qball and will like to know if it is possible to do charged defect calculations with qball?
If yes, how can one set this up in the input file?

Output File not Valid XML: <_ expectation set>

I have been having some trouble parsing output files from qbox/qball with python's XML parsers. The offending lines have attributes without values in them, such as:

<FORKTD expectation set>

In order parse these files I have been adding some extra underscores (e.g., <FORKTD expectation set> to <FORKTD_expectation_set>).

My questions for you are:

  1. Do you also view the inability to read the output files with Python as an issue?
  2. Is adding underscores to the output statements of offending tags an acceptable fix? I am not a qball user, so I'm not 100% sure what these tags mean
  3. Do you mind if I attempt to make the changes? I see that these lines are output in EhrenSampleStepper.C. Am I missing anywhere?

Configure scripts not checking for C++11

The configure script completes fine even if C++11 is not supported by the compiler (at least with xl compiler). The program will fail to compile in the compilation stage.

Better error message when using PSDA and wf_diag

When wavefunction dynamics are governed by preconditioned steepest descent with Anderson acceleration (PSDA) and the user tries to diagonalize the wavefunctions, i.e. when the input script includes the lines

set wf_dyn PSDA
set wf_diag true

the following error message is returned:

<ERROR> BOSampleStepper: PSDA unstable with empty states and nite = 0. </ERROR>
<ERROR> BOSampleStepper: Increase nite or use wf_dyn = PSD. </ERROR>

PSDA is stable when set wf_diag true is removed from the input script, but the current error message doesn't reflect this.

Density of states from Qball

Hello!

Is it possible to extract density of states from Qball? If yes how is it done? which "command" allows for the extraction/calculation of such data?

Large difference between etotal_int and etotal values

Hi,

I do not know if this is a real issue or I am doing something wrong, but Alfredo told me to write here.

If I try to find converge the ground state of a system with qball (also with the latest version on bg/q) I see a large difference (about 700 H) between etotal and etotal_int values in some cases. I have attached the input files I use to run the calculation.

The problem arises when I use:
run 0 1000 10 (for example)
and I do not see this behaviour if I use:
run 0 1000

Result is like this:
plot.pdf

Best wishes,
Artur

[find_gs.qbi]
set force_complex_wf ON
set stress ON
set nrowmax 256

struc.qbs

set ecut 150 Ry
randomize_wf

set wf_dyn PSDA

run 0 500
run 0 100 5
run 0 100 5
run 0 500
run 0 500
run 0 100 5
run 0 100 5

[struc.qbs]
set cell 20.465734 0.000000 0.000000 0.000000 20.465734 0.000000 0.000000 0.000000 20.465734
species Cu Cu_HSCV_LDA-1.0.xml
atom Cu0 Cu 0.000000 0.000000 0.000000
atom Cu1 Cu 3.410962 3.410962 0.000000
... (FCC structure with 108 atoms)

[sbatch job]
The things that go in front for 128 node run on vulcan

echo "### Start"
date
srun ~/Bin/qball_vulcan find_gs.qbi > find_gs.out
grep etotal_int find_gs.out > Energy.data
grep '' find_gs.out > Etotal.data
echo "### Finish"
date

qbLink error message during make

In a simple installation in Fedora mpich, ./configure/ then make I get this error after make:

Makefile:1222: recipe for target 'qbLink.o' failed
make[2]: *** [qbLink.o] Error 1
make[2]: Leaving directory '/home/correaa/code/qball/src'
Makefile:395: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/correaa/code/qball'
Makefile:336: recipe for target 'all' failed
make: *** [all] Error 2

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.