Ejemplo n.º 1
0
void AmberNetcdf::updateGroupCoordsImpl(AtomicGroup& g) {

  for (AtomicGroup::iterator i = g.begin(); i != g.end(); ++i) {
      uint idx = (*i)->index();
      if (idx >= _natoms)
        throw(LOOSError(**i, "Atom index into trajectory frame is out of bounds"));
      idx *= 3;
      (*i)->coords(GCoord(_coord_data[idx], _coord_data[idx+1], _coord_data[idx+2]));
    }
    
    if (_periodic)
      g.periodicBox(GCoord(_box_data[0], _box_data[1], _box_data[2]));
  }
Ejemplo n.º 2
0
GRGlue::GRGlue(GRStaff * grstf, int _isstart)	// (JB) Something obscur: sometimes, GRGlue is
												// created with _isstart = -1, why is that ?
												// I'd like to replace it by a bool, but I can't...
{
	mGrStaff = grstf;

	mIsStart = _isstart;
	mNeedsSpring = 1;

	float curLSPACE = LSPACE;
	if (mGrStaff)
		curLSPACE = mGrStaff->getStaffLSPACE();
	if (mIsStart == 1)
	{
		mSConst = SCONST_GLUESTART;

		// this does not work?
		mRightSpace = GCoord(curLSPACE);
	}
	else
	{
		mSConst = 100; // SCONST_GLUENOSTART;
		mRightSpace = GCoord(curLSPACE);
		// leftSpace = 5*LSPACE;
	}

	mPartner = NULL;

	// this is the left and right margin that need
	// to be maintained in all cases ...

	mBoundingBox.right = 0;
	mBoundingBox.left = 0;
	/* if (isstart)
		mBoundingBox.right = LSPACE;
	else
		mBoundingBox.left = -LSPACE;
		*/
}