Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PBC gaussian #706

Merged
merged 31 commits into from
Mar 29, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cc2db2d
Merge branch 'develop' of https://github.com/QMCPACK/qmcpack into dev…
anbenali Jan 31, 2018
a9c445f
Step 1: All piping Done + Periodic eval of Psi; Remaining: Gradiant! …
anbenali Feb 13, 2018
ecd4280
Workinggit add ../src/QMCWaveFunctions/lcao/SoaAtomicBasisSet.h ../sr…
anbenali Feb 16, 2018
f5bcdce
Working and tested. Need sposet for multidets
anbenali Feb 18, 2018
0ae8873
Tests from Molecular pyscf corrected! All good to go. Testing for sup…
anbenali Feb 20, 2018
d522994
END OF PBC Gaussians. This is the split in the PR
anbenali Feb 21, 2018
4c8d8b1
Should probably be new PR : SPOSET SOA with HDF5 handling for Multid…
anbenali Feb 21, 2018
7baf4ff
Step 2 in sposet. still debugging
anbenali Feb 22, 2018
234511e
Working VMC/DMC for Multideterminants Gaussians with PBC - with H5rea…
anbenali Feb 22, 2018
81e44e2
Fixes for Spherical harmonics
anbenali Mar 14, 2018
f0f11cf
Test case Carbon Diamond 1x1x1
anbenali Mar 22, 2018
4bb8e22
symlinks to reduce number of files
anbenali Mar 22, 2018
d10bfd9
Tests LDA Gaussian complete
anbenali Mar 23, 2018
30199e2
Forgotten file
anbenali Mar 23, 2018
3d8a1e7
Adding endpoint implementation of NbImages to be used in the evaluati…
anbenali Mar 25, 2018
903842d
Remove old commented implemnatation
anbenali Mar 25, 2018
0c34c3b
FULLY COMPLETED: Nb of Periodic images to evaluate orbitals effectiv…
anbenali Mar 25, 2018
d4e8bc6
Merge branch 'develop' into PBC-Gaussian
anbenali Mar 25, 2018
0e18560
Forgotten to re-enable when kpoints are defined as Complex in pyscf b…
anbenali Mar 25, 2018
9eb35e5
I do not know why this is here
anbenali Mar 25, 2018
152d396
Fixed qmc-ref
anbenali Mar 26, 2018
b10a92f
Removing test for kpoints since not completed yet
anbenali Mar 26, 2018
2d03c2a
bug in CMakeList
anbenali Mar 26, 2018
c263642
Fixed molecular H5 files to the latest version of builder
anbenali Mar 26, 2018
47ded4a
Fixing more failed tests in Molecules
anbenali Mar 26, 2018
c306573
Fixing all H5 files in Molecules
anbenali Mar 26, 2018
b444e24
more cleanup
anbenali Mar 26, 2018
f3878f8
Reference for diamond 1x1x1
anbenali Mar 29, 2018
e819f3a
All tests + minor fixes
anbenali Mar 29, 2018
292bb3b
Final Push. All requests answered
anbenali Mar 29, 2018
a0e8aa3
Merge branch 'develop' into PBC-Gaussian
anbenali Mar 29, 2018
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
Prev Previous commit
Next Next commit
Working and tested. Need sposet for multidets
  • Loading branch information
anbenali committed Feb 18, 2018
commit f5bcdce3836f28b5fbf3fc8458ddd79687003280
5 changes: 3 additions & 2 deletions src/QMCTools/PyscfToQmcpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ def order_mo_coef(ll):
GroupParameter.create_dataset("SpinUnResticted",(1,),dtype="b1",data=UnRestricted)
GroupNbkpts=H5_qmcpack.create_group("Nb_KPTS")
if not PBC:
GroupNbkpts.create_dataset("Nbkpts",(1,0),dtype="i4",data=1)
Nbkpts=1
GroupNbkpts.create_dataset("Nbkpts",(1,),dtype="i4",data=Nbkpts)

GroupDet=H5_qmcpack.create_group("KPTS_0")
if UnRestricted==False:
Expand Down Expand Up @@ -404,7 +405,7 @@ def get_mo(mo_coeff, cart):


print 'Wavefunction successfuly saved to QMCPACK HDF5 Format'
print 'Use: "convert4qmc -Pyscf {}.h5" to generate QMCPACK input files'.format(title)
print 'Use: "convert4qmc -pyscf {}.h5" to generate QMCPACK input files'.format(title)
# Close the file before exiting
H5_qmcpack.close()

62 changes: 54 additions & 8 deletions src/QMCWaveFunctions/lcao/LCAOrbitalBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ bool SPOSetBase::put(xmlNodePtr cur)
if(H5file==false)
success = putFromXML(coeff_ptr);
else

if(H5file!=true){
APP_ABORT("Error in Opening HDF5");
}
Expand Down Expand Up @@ -661,6 +662,7 @@ bool SPOSetBase::putPBCFromH5(const char* fname, xmlNodePtr coeff_ptr)
int setVal=-1;
int NbKpts;
int KptIdx=0;
bool IsComplex=false;
PosType twist(0.0);
PosType twistH5(0.0);
std::string setname;
Expand All @@ -672,6 +674,7 @@ bool SPOSetBase::putPBCFromH5(const char* fname, xmlNodePtr coeff_ptr)
setIdentity(false);
hdf_archive hin(myComm);


xmlNodePtr curtemp=coeff_ptr->parent->parent->parent;
aAttrib.add(twist,"twist");
aAttrib.put(curtemp);
Expand All @@ -681,6 +684,9 @@ bool SPOSetBase::putPBCFromH5(const char* fname, xmlNodePtr coeff_ptr)
if (!hin.open(fname)){
APP_ABORT("SPOSetBase::putFromH5 missing or incorrect path to H5 file.");
}
hin.push("parameters");
hin.read(IsComplex,"IsComplex");
hin.pop();
hin.push("Nb_KPTS");
hin.read(NbKpts,"Nbkpts");
hin.pop();
Expand All @@ -697,20 +703,59 @@ bool SPOSetBase::putPBCFromH5(const char* fname, xmlNodePtr coeff_ptr)
}
}

Matrix<ValueType> Ctemp(BasisSetSize,BasisSetSize);
Matrix<RealType> CtempReal(BasisSetSize,BasisSetSize);
Matrix<RealType> CtempImag(BasisSetSize,BasisSetSize);
/*
TinyVector<size_t,3> dims(BasisSetSize,BasisSetSize,2);
std::vector<double> Ctemp_space;

Ctemp_space.resize(BasisSetSize*BasisSetSize*2);
hyperslab_proxy<std::vector<double>, 3> slab(Ctemp_space,dims);

hin.read(slab,"toto");

Matrix<std::complex<double> > Ctemp_cplx(BasisSetSize,BasisSetSize);
Ctemp_cplx.free();
Ctemp_cplx.attachReference(dynamic_cast<std::complex<double> *>(Ctemp_space.data()));
*/


char name[72];
sprintf(name,"%s%d%s%d","/KPTS_",KptIdx,"/eigenset_",setVal);
setname=name;
if(IsComplex){
sprintf(name,"%s%d%s%d%s","/KPTS_",KptIdx,"/eigenset_",setVal,"_real");
setname=name;
if(!hin.read(CtempReal,setname))
{
setname="SPOSetBase::putFromH5 Missing "+setname+" from HDF5 File.";
APP_ABORT(setname.c_str());
}
sprintf(name,"%s%d%s%d%s","/KPTS_",KptIdx,"/eigenset_",setVal,"_imag");
setname=name;
if(!hin.read(CtempImag,setname))
{
setname="SPOSetBase::putFromH5 Missing "+setname+" from HDF5 File.";
APP_ABORT(setname.c_str());
}

}
else{
sprintf(name,"%s%d%s%d","/KPTS_",KptIdx,"/eigenset_",setVal);
setname=name;
if(!hin.read(CtempReal,setname))
{
setname="SPOSetBase::putFromH5 Missing "+setname+" from HDF5 File.";
APP_ABORT(setname.c_str());
}
}


#if defined (QMC_COMPLEX)
APP_ABORT("Complex Wavefunction not implemented yet. Please contact Developers");
#else
Matrix<RealType> Ctemp(BasisSetSize,BasisSetSize);
if(!hin.read(Ctemp,setname))
{
setname="SPOSetBase::putFromH5 Missing "+setname+" from HDF5 File.";
APP_ABORT(setname.c_str());
}

Ctemp=CtempReal;

#endif //COMPLEX
hin.close();

Expand All @@ -732,4 +777,5 @@ bool SPOSetBase::putPBCFromH5(const char* fname, xmlNodePtr coeff_ptr)
return true;
}


}