void CReflCalc::Init(ReflSettings* InitStruct) { lambda = InitStruct->Wavelength; k0 = 2.0*M_PI/lambda; objectivefunction = InitStruct->Objectivefunction; m_bforcenorm = InitStruct->Forcenorm; m_dnormfactor = 1.0; m_dQSpread = InitStruct->QErr/100; m_bXRonly = InitStruct->XRonly; m_bImpNorm = InitStruct->Impnorm; //Setup OpenMP - currently a maximum of 8 processors is allowed. After a certain number //of data points, there will not be much of a benefit to allowing additional processors //to work on the calculation. If more than 2-300 data points are being analyzed, it would //make sense to increase this number if(MAX_OMP_THREADS > omp_get_num_procs()) m_iuseableprocessors = omp_get_num_procs(); else m_iuseableprocessors = MAX_OMP_THREADS; //For Debugging Purposes #ifdef SINGLEPROCDEBUG m_iuseableprocessors = 1; #endif omp_set_num_threads(m_iuseableprocessors); SetupRef(InitStruct); }
/** Called every time the trajectory changes. Set up FrameMask for the new * parmtop and allocate space for selected atoms from the Frame. */ Action::RetType Action_Rmsd::Setup(Topology* currentParm, Topology** parmAddress) { // Target setup if (SetupRmsMask(*currentParm, "rmsd")) return Action::ERR; // Reference setup if (SetupRef(*currentParm, TgtMask().Nselected(), "rmsd")) return Action::ERR; // Per residue rmsd setup if (perres_) { // If RefParm is still NULL probably 'first', set now. if (RefParm_ == 0) RefParm_ = currentParm; if (perResSetup(currentParm, RefParm_)) return Action::ERR; } return Action::OK; }