Vector MoleculeOrientation::getCentralAtom(){ if( getNAtoms()==2 ){ Vector com; com.zero(); com+=0.5*getPosition(0); com+=0.5*getPosition(1); addCentralAtomDerivatives( 0, 0.5*Tensor::identity() ); addCentralAtomDerivatives( 1, 0.5*Tensor::identity() ); return com; } addCentralAtomDerivatives( 2, Tensor::identity() ); return getPosition(2); }
Vector Steinhardt::getCentralAtom(){ addCentralAtomDerivatives( 0, Tensor::identity() ); return getPosition(0); }