本文整理汇总了C++中Box::Beta方法的典型用法代码示例。如果您正苦于以下问题:C++ Box::Beta方法的具体用法?C++ Box::Beta怎么用?C++ Box::Beta使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Box
的用法示例。
在下文中一共展示了Box::Beta方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Recip_ParticleMesh
// Ewald::Recip_ParticleMesh()
double Ewald_ParticleMesh::Recip_ParticleMesh(Box const& boxIn)
{
t_recip_.Start();
// This essentially makes coordsD and chargesD point to arrays.
Mat coordsD(&coordsD_[0], Charge_.size(), 3);
Mat chargesD(&Charge_[0], Charge_.size(), 1);
int nfft1 = nfft_[0];
int nfft2 = nfft_[1];
int nfft3 = nfft_[2];
if ( DetermineNfft(nfft1, nfft2, nfft3, boxIn) ) {
mprinterr("Error: Could not determine grid spacing.\n");
return 0.0;
}
// Instantiate double precision PME object
// Args: 1 = Exponent of the distance kernel: 1 for Coulomb
// 2 = Kappa
// 3 = Spline order
// 4 = nfft1
// 5 = nfft2
// 6 = nfft3
// 7 = scale factor to be applied to all computed energies and derivatives thereof
// 8 = max # threads to use for each MPI instance; 0 = all available threads used.
// NOTE: Scale factor for Charmm is 332.0716
// NOTE: The electrostatic constant has been baked into the Charge_ array already.
//auto pme_object = std::unique_ptr<PMEInstanceD>(new PMEInstanceD());
pme_object_.setup(1, ew_coeff_, order_, nfft1, nfft2, nfft3, 1.0, 0);
// Sets the unit cell lattice vectors, with units consistent with those used to specify coordinates.
// Args: 1 = the A lattice parameter in units consistent with the coordinates.
// 2 = the B lattice parameter in units consistent with the coordinates.
// 3 = the C lattice parameter in units consistent with the coordinates.
// 4 = the alpha lattice parameter in degrees.
// 5 = the beta lattice parameter in degrees.
// 6 = the gamma lattice parameter in degrees.
// 7 = lattice type
pme_object_.setLatticeVectors(boxIn.BoxX(), boxIn.BoxY(), boxIn.BoxZ(),
boxIn.Alpha(), boxIn.Beta(), boxIn.Gamma(),
PMEInstanceD::LatticeType::XAligned);
double erecip = pme_object_.computeERec(0, chargesD, coordsD);
t_recip_.Stop();
return erecip;
}
示例2: LJ_Recip_ParticleMesh
/** The LJ PME reciprocal term. */
double Ewald_ParticleMesh::LJ_Recip_ParticleMesh(Box const& boxIn)
{
t_recip_.Start();
int nfft1 = nfft_[0];
int nfft2 = nfft_[1];
int nfft3 = nfft_[2];
if ( DetermineNfft(nfft1, nfft2, nfft3, boxIn) ) {
mprinterr("Error: Could not determine grid spacing.\n");
return 0.0;
}
Mat coordsD(&coordsD_[0], Charge_.size(), 3);
Mat cparamD(&Cparam_[0], Cparam_.size(), 1);
//auto pme_vdw = std::unique_ptr<PMEInstanceD>(new PMEInstanceD());
pme_vdw_.setup(6, lw_coeff_, order_, nfft1, nfft2, nfft3, -1.0, 0);
pme_vdw_.setLatticeVectors(boxIn.BoxX(), boxIn.BoxY(), boxIn.BoxZ(),
boxIn.Alpha(), boxIn.Beta(), boxIn.Gamma(),
PMEInstanceD::LatticeType::XAligned);
double evdwrecip = pme_vdw_.computeERec(0, cparamD, coordsD);
t_recip_.Stop();
return evdwrecip;
}