本文整理汇总了C++中ActionSetup::SetCoordInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ ActionSetup::SetCoordInfo方法的具体用法?C++ ActionSetup::SetCoordInfo怎么用?C++ ActionSetup::SetCoordInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActionSetup
的用法示例。
在下文中一共展示了ActionSetup::SetCoordInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Setup
/** Set angle up for this parmtop. Get masks etc.
*/
Action::RetType Action_Esander::Setup(ActionSetup& setup) {
if (currentParm_ != 0 && currentParm_->Pindex() != setup.Top().Pindex())
{
mprintf("Warning: Current topology is %i:%s but reference is %i:%s. Skipping.\n",
setup.Top().Pindex(), setup.Top().c_str(),
currentParm_->Pindex(), currentParm_->c_str());
return Action::SKIP;
}
// Check for LJ terms
if (!setup.Top().Nonbond().HasNonbond())
{
mprinterr("Error: Topology '%s' does not have non-bonded parameters.\n", setup.Top().c_str());
return Action::ERR;
}
// If reference specified, init now. Otherwise using first frame.
if (currentParm_ != 0 ) {
if ( InitForRef() ) return Action::ERR;
} else
currentParm_ = setup.TopAddress();
// If saving of forces is requested, make sure CoordinateInfo has force.
if (save_forces_) {
cInfo_ = setup.CoordInfo();
cInfo_.SetForce( true );
newFrame_.SetupFrameV( setup.Top().Atoms(), cInfo_ );
setup.SetCoordInfo( &cInfo_ );
ret_ = Action::MODIFY_COORDS;
return Action::MODIFY_TOPOLOGY;
}
ret_ = Action::OK;
return Action::OK;
}