//! Type for storing PBC atom information for all vsite types in the system
typedef std::array<std::vector<int>, c_ftypeVsiteEnd - c_ftypeVsiteStart> VsitePbc;
+//! Whether we calculate vsite positions, velocities, or both
+enum class VSiteOperation
+{
+ Positions, //!< Calculate only positions
+ Velocities, //!< Calculate only velocities
+ PositionsAndVelocities, //!< Calculate both positions and velocities
+ Count //!< The number of entries
+};
+
/*! \libinternal
* \brief Class that handles construction of vsites and spreading of vsite forces
*/
/*! \brief Create positions of vsite atoms based for the local system
*
- * \param[in,out] x The coordinates
- * \param[in] dt The time step
- * \param[in,out] v When not empty, velocities for vsites are set as displacement/dt
- * \param[in] box The box
+ * \param[in,out] x The coordinates
+ * \param[in,out] v The velocities, needed if operation requires it
+ * \param[in] box The box
+ * \param[in] operation Whether we calculate positions, velocities, or both
*/
- void construct(ArrayRef<RVec> x, real dt, ArrayRef<RVec> v, const matrix box) const;
+ void construct(ArrayRef<RVec> x, ArrayRef<RVec> v, const matrix box, VSiteOperation operation) const;
//! Tells how to handle virial contributions due to virtual sites
enum class VirialHandling : int