本文整理汇总了C++中ActionFrame::SetFrame方法的典型用法代码示例。如果您正苦于以下问题:C++ ActionFrame::SetFrame方法的具体用法?C++ ActionFrame::SetFrame怎么用?C++ ActionFrame::SetFrame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActionFrame
的用法示例。
在下文中一共展示了ActionFrame::SetFrame方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoAction
// Action_Esander::DoAction()
Action::RetType Action_Esander::DoAction(int frameNum, ActionFrame& frm) {
if (refFrame_.empty()) {
refFrame_ = frm.Frm();
if ( InitForRef() ) return Action::ERR;
}
if (save_forces_) {
newFrame_.SetCoordAndBox( frm.Frm() );
SANDER_.CalcEnergyForces( newFrame_ );
frm.SetFrame( &newFrame_ );
} else
// FIXME: Passing in ModifyFrm() to give CalcEnergy access to non-const pointers
SANDER_.CalcEnergy( frm.ModifyFrm() );
for (int ie = 0; ie != (int)Energy_Sander::N_ENERGYTYPES; ie++) {
if (Esets_[ie] != 0)
Esets_[ie]->Add(frameNum, SANDER_.Eptr((Energy_Sander::Etype)ie));
}
return ret_;
}
示例2: DoAction
/** Modify the current frame based on the atom map.
*/
Action::RetType Action_AtomMap::DoAction(int frameNum, ActionFrame& frm) {
if (maponly_) return Action::OK;
// Perform RMS fit on mapped atoms only
if (rmsfit_) {
// Set target frame up according to atom map.
rmsTgtFrame_.ModifyByMap(frm.Frm(), AMap_);
Matrix_3x3 Rot;
Vec3 Trans, refTrans;
double R = rmsTgtFrame_.RMSD(rmsRefFrame_, Rot, Trans, refTrans, false);
frm.ModifyFrm().Trans_Rot_Trans(Trans, Rot, refTrans);
if (rmsdata_!=0)
rmsdata_->Add(frameNum, &R);
return Action::OK;
}
// Modify the current frame
// TODO: Fix this since its probably busted for unmapped atoms
newFrame_->SetCoordinatesByMap(frm.Frm(), AMap_);
frm.SetFrame( newFrame_ );
return Action::MODIFY_COORDS;
}
示例3: DoAction
// Action_SymmetricRmsd::DoAction()
Action::RetType Action_SymmetricRmsd::DoAction(int frameNum, ActionFrame& frm) {
// Perform any needed reference actions
REF_.ActionRef( frm.Frm(), SRMSD_.Fit(), SRMSD_.UseMass() );
// Calculate symmetric RMSD
selectedTgt_.SetCoordinates( frm.Frm(), tgtMask_ );
double rmsdval = SRMSD_.SymmRMSD_CenteredRef( selectedTgt_, REF_.SelectedRef() );
rmsd_->Add(frameNum, &rmsdval);
if (remap_) {
// Now re-map the target frame
for (int atom = 0; atom < (int)targetMap_.size(); atom++)
targetMap_[atom] = atom;
SymmetricRmsdCalc::Iarray const& AMap = SRMSD_.AMap();
for (unsigned int ref = 0; ref < AMap.size(); ++ref)
targetMap_[ tgtMask_[ref] ] = tgtMask_[AMap[ref]];
remapFrame_.SetCoordinatesByMap( frm.Frm(), targetMap_ );
frm.SetFrame( &remapFrame_ );
}
if ( SRMSD_.Fit() )
frm.ModifyFrm().Trans_Rot_Trans( SRMSD_.TgtTrans(), SRMSD_.RotMatrix(), REF_.RefTrans() );
return action_return_;
}