Atom.h 1.4 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
// Atom.h:
//
////////////////////////////////////////////////////////////////////////////////
Francois Gygi committed
18
// $Id: Atom.h,v 1.6 2008-09-08 15:56:17 fgygi Exp $
Francois Gygi committed
19 20 21 22 23 24 25 26 27 28

#ifndef ATOM_H
#define ATOM_H

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

class Atom
{
  private:
29

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

  public:

37
  Atom (std::string name, std::string species,
38 39 40
        D3vector position, D3vector velocity);
  std::string name(void) { return name_; };
  std::string species(void) { return species_; };
Francois Gygi committed
41 42 43 44 45 46 47
  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); };
};

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