Commit 2bca4a17 by Francois Gygi

added reset_velocities member


git-svn-id: http://qboxcode.org/svn/qb/trunk@176 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 4e0a76dc
......@@ -3,7 +3,7 @@
// AtomSet.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: AtomSet.C,v 1.9 2003-11-21 19:07:24 fgygi Exp $
// $Id: AtomSet.C,v 1.10 2004-03-11 21:44:08 fgygi Exp $
#include "AtomSet.h"
#include "NameOf.h"
......@@ -299,6 +299,20 @@ void AtomSet::set_velocities(const vector<vector<double> >& vel)
}
////////////////////////////////////////////////////////////////////////////////
void AtomSet::reset_velocities(void)
{
for ( int is = 0; is < atom_list.size(); is++ )
{
int i = 0;
for ( int ia = 0; ia < atom_list[is].size(); ia++ )
{
atom_list[is][ia]->set_velocity(D3vector(0.0, 0.0, 0.0));
i += 3;
}
}
}
////////////////////////////////////////////////////////////////////////////////
ostream& operator << ( ostream &os, AtomSet &as )
{
if ( as.context().onpe0() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment