Atom.h 1.35 KB
Newer Older
Francois Gygi committed
1 2
////////////////////////////////////////////////////////////////////////////////
//
Francois Gygi committed
3 4 5 6
// Copyright (c) 2008 The Regents of the University of California
//
// This file is part of Qbox
//
Francois Gygi committed
7 8
// Qbox is distributed under the terms of the GNU General Public License
// as published by the Free Software Foundation, either version 2 of
Francois Gygi committed
9 10 11 12 13 14
// the License, or (at your option) any later version.
// See the file COPYING in the root directory of this distribution
// or <http://www.gnu.org/licenses/>.
//
////////////////////////////////////////////////////////////////////////////////
//
Francois Gygi committed
15 16 17 18 19 20 21 22 23 24 25 26 27
// Atom.h:
//
////////////////////////////////////////////////////////////////////////////////

#ifndef ATOM_H
#define ATOM_H

#include "D3vector.h"
#include <string>

class Atom
{
  private:
28

29 30
  std::string name_;
  std::string species_;
Francois Gygi committed
31 32 33 34 35
  D3vector position_;
  D3vector velocity_;

  public:

36
  Atom (std::string name, std::string species,
37 38 39
        D3vector position, D3vector velocity);
  std::string name(void) { return name_; };
  std::string species(void) { return species_; };
Francois Gygi committed
40 41 42 43 44 45 46
  D3vector position(void) { return position_; };
  D3vector velocity(void) { return velocity_; };
  void set_position(D3vector p) { position_ = p; };
  void set_velocity(D3vector v) { velocity_ = v; };
  void block(void) { velocity_ = D3vector(0.0,0.0,0.0); };
};

47
std::ostream& operator << ( std::ostream &os, Atom &a );
Francois Gygi committed
48
#endif