mirror of https://github.com/QMCPACK/qmcpack.git
clean up nofk input block, add nexus support
This commit is contained in:
parent
8c006b2841
commit
fb65b4e84f
|
@ -2206,6 +2206,13 @@ class flux(QIxml):
|
|||
identifier = 'name'
|
||||
#end class flux
|
||||
|
||||
class momentum(QIxml):
|
||||
tag = 'estimator'
|
||||
attributes = ['type','name','grid','samples','hdf5','wavefunction']
|
||||
identifier = 'name'
|
||||
write_types = obj(hdf5=yesno)
|
||||
#end class momentum
|
||||
|
||||
estimator = QIxmlFactory(
|
||||
name = 'estimator',
|
||||
types = dict(localenergy = localenergy,
|
||||
|
@ -2226,6 +2233,7 @@ estimator = QIxmlFactory(
|
|||
skall = skall,
|
||||
gofr = gofr,
|
||||
flux = flux,
|
||||
momentum = momentum,
|
||||
),
|
||||
typekey = 'type',
|
||||
typekey2 = 'name'
|
||||
|
@ -2457,7 +2465,7 @@ classes = [ #standard classes
|
|||
header,local,force,forwardwalking,observable,record,rmc,pressure,dmccorrection,
|
||||
nofk,mpc_est,flux,distancetable,cpp,element,spline,setparams,
|
||||
backflow,transformation,cubicgrid,molecular_orbital_builder,cmc,sk,skall,gofr,
|
||||
host,date,user,rpa_jastrow
|
||||
host,date,user,rpa_jastrow,momentum
|
||||
]
|
||||
types = dict( #simple types and factories
|
||||
#host = param,
|
||||
|
@ -2641,6 +2649,9 @@ force.defaults.set(
|
|||
pressure.defaults.set(
|
||||
type='Pressure'
|
||||
)
|
||||
momentum.defaults.set(
|
||||
type='momentum'
|
||||
)
|
||||
|
||||
|
||||
linear.defaults.set(
|
||||
|
|
|
@ -166,22 +166,10 @@ bool MomentumEstimator::putSpecial(xmlNodePtr cur, ParticleSet& elns, bool rootN
|
|||
OhmmsAttributeSet pAttrib;
|
||||
std::string hdf5_flag="yes";
|
||||
pAttrib.add(hdf5_flag,"hdf5");
|
||||
pAttrib.add(kgrid,"grid");
|
||||
pAttrib.add(M,"samples");
|
||||
pAttrib.put(cur);
|
||||
hdf5_out = (hdf5_flag=="yes");
|
||||
// app_log()<<" MomentumEstimator::putSpecial "<< std::endl;
|
||||
xmlNodePtr kids=cur->children;
|
||||
while (kids!=NULL)
|
||||
{
|
||||
std::string cname((const char*)(kids->name));
|
||||
// app_log()<<" MomentumEstimator::cname : "<<cname<< std::endl;
|
||||
if (cname=="kpoints")
|
||||
{
|
||||
std::string ctype("manual");
|
||||
OhmmsAttributeSet pAttrib;
|
||||
pAttrib.add(ctype,"mode");
|
||||
pAttrib.add(kgrid,"grid");
|
||||
pAttrib.put(kids);
|
||||
#if OHMMS_DIM==3
|
||||
int numqtwists(6*kgrid+3);
|
||||
std::vector<int> qk(0);
|
||||
|
@ -195,7 +183,6 @@ bool MomentumEstimator::putSpecial(xmlNodePtr cur, ParticleSet& elns, bool rootN
|
|||
mappedQnorms[3*kgrid+1]=qn/RealType(M);
|
||||
if (twist[2]==0)
|
||||
mappedQnorms[5*kgrid+2]=qn/RealType(M);
|
||||
// app_log()<<" Jnorm="<<qn<< std::endl;
|
||||
Q.resize(numqtwists);
|
||||
for (int i=-kgrid; i<(kgrid+1); i++)
|
||||
{
|
||||
|
@ -247,7 +234,6 @@ bool MomentumEstimator::putSpecial(xmlNodePtr cur, ParticleSet& elns, bool rootN
|
|||
mappedQnorms[kgrid]=qn/RealType(M);
|
||||
if (twist[1]==0)
|
||||
mappedQnorms[3*kgrid+1]=qn/RealType(M);
|
||||
// app_log()<<" Jnorm="<<qn<< std::endl;
|
||||
Q.resize(numqtwists);
|
||||
for (int i=-kgrid; i<(kgrid+1); i++)
|
||||
{
|
||||
|
@ -281,9 +267,6 @@ bool MomentumEstimator::putSpecial(xmlNodePtr cur, ParticleSet& elns, bool rootN
|
|||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
kids=kids->next;
|
||||
}
|
||||
if (rootNode)
|
||||
{
|
||||
std::stringstream sstr;
|
||||
|
|
Loading…
Reference in New Issue