Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2b977cf
broken, but initial update of qmcfinite to new code
camelto2 Feb 28, 2020
545c267
edits to make qmcfinitesize up to date with develop
camelto2 Mar 4, 2020
638152d
changes to output formatting
camelto2 Mar 4, 2020
519ba94
Merge branch 'develop' into qmcFScorr
camelto2 Mar 5, 2020
2a3387b
clang-formatting
camelto2 Mar 5, 2020
0150c9b
removed empty file SkParserHDF5.h
camelto2 Mar 5, 2020
0326b05
remove unused code
camelto2 Mar 6, 2020
9493edb
improved spherical grid and handling cases outside spline grid
camelto2 Mar 10, 2020
c741895
add warning for S(k) not being convegred
camelto2 Mar 10, 2020
901c0ef
small fix
camelto2 Mar 10, 2020
4e69879
Merge remote-tracking branch 'upstream/develop' into qmcFScorr
camelto2 Mar 10, 2020
d21f65b
isolate qmcfinitesize in cmake
camelto2 Mar 10, 2020
3f34114
small change to spherical_grid
camelto2 Mar 11, 2020
4575b2b
refactoring for error estimates
camelto2 Mar 11, 2020
273c40b
add stats function, and get potential corr ready for bootstrap
camelto2 Mar 11, 2020
971336b
FS corrections with bootstrapped error estimate
camelto2 Mar 11, 2020
2b180af
Merge remote-tracking branch 'upstream/develop' into qmcFScorr
camelto2 Mar 11, 2020
920fe12
clang format and remove unused CellParserBase
camelto2 Mar 11, 2020
e425e64
fix to rng to work with mixed precision build
camelto2 Mar 11, 2020
65e8602
removed empty CMakeLists
camelto2 Mar 18, 2020
f5a36af
Merge remote-tracking branch 'upstream/develop' into qmcFScorr
camelto2 Mar 23, 2020
f852a4c
initial unit test architecture for QMCTools and QMCFiniteSize
camelto2 Mar 23, 2020
c0b999f
adding unit test, interface to vlr_k in LRHandlers
camelto2 Mar 27, 2020
d06cda6
Merge remote-tracking branch 'upstream/develop' into qmcFScorr
camelto2 Mar 27, 2020
327a9e2
clang-formatting and copyright updates on touched files
camelto2 Mar 27, 2020
34a226f
Merge branch 'develop' into qmcFScorr
prckent Mar 30, 2020
dcada08
fix constructor initialization order and no return type
camelto2 Mar 30, 2020
15cf71f
Merge remote-tracking branch 'upstream/develop' into qmcFScorr
camelto2 Mar 30, 2020
a506037
Merge remote-tracking branch 'origin/qmcFScorr' into qmcFScorr
camelto2 Mar 30, 2020
5d9e634
to trigger the CI
PDoakORNL Mar 30, 2020
8f7dba4
fix compiler warnings for return types and QMCFiniteSize initializatino
camelto2 Mar 30, 2020
2f8ad91
Merge branch 'qmcFScorr' of https://github.com/camelto2/qmcpack into …
camelto2 Mar 30, 2020
2113d4c
to trigger CI
PDoakORNL Mar 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions src/LongRange/LRHandlerBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@ struct LRHandlerBase
return vk;
}

inline mRealType evaluate_w_sk(const std::vector<int>& kshell, const pRealType* restrict sk)
{
mRealType vk = 0.0;
for (int ks = 0, ki = 0; ks < MaxKshell; ks++)
{
mRealType u = 0;
for (; ki < kshell[ks + 1]; ki++)
u += (*sk++);
vk += Fk_symm[ks] * u;
}
return vk;
}

inline mRealType evaluate(const std::vector<int>& kshell,
const pRealType* restrict rk1_r,
const pRealType* restrict rk1_i,
Expand Down Expand Up @@ -303,7 +316,7 @@ struct DummyLRHandler : public LRHandlerBase
Fk.resize(KList.kpts_cart.size());
for (ksh = 0, ik = 0; ksh < MaxKshell; ksh++, ik++)
{
mRealType v = norm * myFunc(kk[KList.kshell[ksh]]); //rpa=u0/kk[ik];
mRealType v = norm * myFunc(kk[KList.kshell[ksh]]); //rpa=u0/kk[ik];
Fk_symm[ksh] = v;
for (; ik < KList.kshell[ksh + 1]; ik++)
Fk[ik] = v;
Expand All @@ -314,8 +327,8 @@ struct DummyLRHandler : public LRHandlerBase
mRealType evaluateLR(mRealType r) { return 0.0; }
mRealType srDf(mRealType r, mRealType rinv) { return 0.0; }
void Breakup(ParticleSet& ref, mRealType rs_in) {}
void resetTargetParticleSet(ParticleSet& ref) {}
virtual LRHandlerBase* makeClone(ParticleSet& ref){return new DummyLRHandler<Func>(LR_kc);}
void resetTargetParticleSet(ParticleSet& ref) {}
virtual LRHandlerBase* makeClone(ParticleSet& ref) { return new DummyLRHandler<Func>(LR_kc); }
};

} // namespace qmcplusplus
Expand Down
11 changes: 10 additions & 1 deletion src/QMCTools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ PROJECT(qmctools)

SET(MOSRCS
../Particle/InitMolecularSystem.cpp
../Particle/ParticleSetPool.cpp
QMCGaussianParserBase.cpp
GaussianFCHKParser.cpp
GamesXmlParser.cpp
Expand All @@ -34,6 +33,10 @@ SET(MOSRCS
GamesFMOParser.cpp
QPParser.cpp
LCAOHDFParser.cpp
QMCFiniteSize/QMCFiniteSize.cpp
QMCFiniteSize/SkParserBase.cpp
QMCFiniteSize/SkParserASCII.cpp
QMCFiniteSize/SkParserScalarDat.cpp
)

# create libmocommon
Expand Down Expand Up @@ -69,6 +72,12 @@ TARGET_LINK_LIBRARIES(convertpw4qmc PRIVATE qmcutil Math::FFTW3)
INSTALL(TARGETS convertpw4qmc
RUNTIME DESTINATION bin)

ADD_EXECUTABLE(qmcfinitesize qmcfinitesize.cpp)
TARGET_LINK_LIBRARIES(qmcfinitesize PRIVATE mocommon qmc qmcwfs)

INSTALL(TARGETS qmcfinitesize
RUNTIME DESTINATION bin)

#ppconvert
if( BUILD_PPCONVERT )
SUBDIRS(ppconvert)
Expand Down
Empty file.
30 changes: 30 additions & 0 deletions src/QMCTools/QMCFiniteSize/CellParserBase.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
//
// File developed by: Jordan E. Vincent, University of Illinois at Urbana-Champaign
// Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
// Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
// Miguel Morales, moralessilva2@llnl.gov, Lawrence Livermore National Laboratory
// Anouar Benali, benali@anl.gov, Argonne National Laboratory
// Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
//
// File created by: Jordan E. Vincent, University of Illinois at Urbana-Champaign
//////////////////////////////////////////////////////////////////////////////////////
#ifndef QMCFINITESIZE_CELL_PARSER_H
#define QMCFINITESIZE_CELL_PARSER_H
using namespace qmcplusplus;

class CellParserBase
{
public:
CellParserBase();
~CellParserBase();

virtual bool put(char* fname);

private:
};
#endif
40 changes: 40 additions & 0 deletions src/QMCTools/QMCFiniteSize/GridUtilities.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#ifndef GRID_UTILITIES_H
#define GRID_UTILITIES_H

#include <vector>
#include <algorithm>
#include "Configuration.h"

namespace qmcplusplus
{
typedef QMCTraits::PosType PosType;
typedef QMCTraits::RealType RealType;
typedef QMCTraits::IndexType IndexType;

void get_gridinfo_from_posgrid(const std::vector<PosType>& posgridlist, //list of grid points
const IndexType& axis, //the axis to get grid info. 0=x, 1=y,etc
RealType& lx, //the lower bound of grid (aka "left").
RealType& rx, //the upper bound (aka "right")
RealType& dx, // the grid spacing
IndexType& Nx) // the number of grid points
{
vector<RealType> kx;
kx.resize(posgridlist.size());

for (IndexType i = 0; i < posgridlist.size(); i++)
kx[i] = posgridlist[i][axis];

vector<RealType>::iterator it;

std::sort(kx.begin(), kx.end());

it = std::unique(kx.begin(), kx.end());

lx = *(kx.begin());
rx = *(it - 1);
Nx = it - kx.begin();
dx = (rx - lx) / RealType(Nx - 1);
}

} // namespace qmcplusplus
#endif
Loading