本文整理汇总了C++中AtomList::changeChargeDistribution方法的典型用法代码示例。如果您正苦于以下问题:C++ AtomList::changeChargeDistribution方法的具体用法?C++ AtomList::changeChargeDistribution怎么用?C++ AtomList::changeChargeDistribution使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AtomList
的用法示例。
在下文中一共展示了AtomList::changeChargeDistribution方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: run
struct GeometricFlowOutput GeometricFlow::run( const AtomList& atomList )
{
//
// initialize the domain - set up the grid size and length
//
domainInitialization( atomList );
std::cout << "dimensions:\t" << p_comdata.nx() << " " <<
p_comdata.ny() << " " << p_comdata.nz() << std::endl;
std::cout << "grid spacing:\t" << p_comdata.deltax() << " " <<
p_comdata.deltay() << " " << p_comdata.deltaz() << std::endl;
//
// assign charge distributions
//
unsigned int natm = atomList.size();
Mat<> charget(natm, 8);
Mat<> corlocqt(natm, 8, 3);
Mat<size_t> loc_qt(natm,8,3);
atomList.changeChargeDistribution( charget, corlocqt, loc_qt, p_comdata );
//atomList.print();
//cout<< "test: " ; p_comdata.print(); cout << endl ;
//
// setup phi
//
Mat<> phi( p_comdata.nx(), p_comdata.ny(), p_comdata.nz(),
p_comdata.deltax(), p_comdata.deltay(), p_comdata.deltaz() ),
phix( phi ),
phivoc( phi ),
surfu( phi ),
eps( phi ),
bg( phi );
vector<double> solv(p_maxstep+1); // keep track of the solvation energies
double diffEnergy = 100;
int iloop = 0;
double tott = 0.0;
double elec = 0.0, area = 0.0, volume = 0.0, attint = 0.0;
double tpb = 0.0; // time step calculation for total pb
int iterf = 0, itert = 0; // iteration num for first iteration and total
double potcoe = 1.0 / m_gamma;
double lj_roro = m_bconc / m_gamma;
double lj_conms = m_press / m_gamma;
int igfin = 1;
//std::cout << "blahh: " << m_press << " " << m_gamma << std::endl;
//
// iteration coupling surface generation and poisson solver
//
while ( (iloop < p_maxstep) && (diffEnergy > m_etolSolvation) )
{
iloop++;
double deltat = 0; //this is wrong for adi...
if (!p_iadi) {
deltat =
pow(p_comdata.deltax()*p_comdata.deltay()*p_comdata.deltaz(), 2.0/3.0)/4.5;
}
//std::cout << "deltat = " << deltat << std::endl;
double totnow = p_tottf - iloop + 1;
if (totnow > 1.0) {
tott = totnow;
} else {
tott = 1.0;
}
area = volume = attint = 0.0;
yhsurface(atomList, tott, deltat, phix, surfu, iloop, area,
volume, attint, p_alpha, p_iadi, igfin, lj_roro, lj_conms);
normalizeSurfuAndEps(surfu, eps);
// Keith wants surfu printed into a dx file
//cout << "surfu: " ; surfu.print(); std::cout << std::endl ;
//cout << "eps: " ; eps.print(); std::cout << std::endl ;
//cout << "charget: " ; charget.print(); std::cout << std::endl ;
//cout << "corlocqt: " ; corlocqt.print(); std::cout << std::endl ;
//
// Create B (bg)
//
if (iloop == 1) {
seteqb(bg, atomList, charget, corlocqt );
}
//
// call the PB Solver!
//
int iter = 1000;
double fpb, titer = 0.0;
pbsolver(eps, phi, bg, m_tol, iter);
if (iloop == 1) {
fpb = titer;
iterf = iter;
}
tpb = tpb + titer;
itert += iter;
eps = m_pdie;
if (iloop == 1) {
//.........这里部分代码省略.........