Commit 22f55599 by Francois Gygi

Added functions for constraints.

git-svn-id: cba15fb0-1239-40c8-b417-11db7ca47a34
parent b0926c38
......@@ -3,19 +3,21 @@
// AtomSet.h
// $Id: AtomSet.h,v 1.10 2004-03-11 21:52:32 fgygi Exp $
// $Id: AtomSet.h,v 1.11 2005-06-27 22:29:53 fgygi Exp $
#ifndef ATOMSET_H
#define ATOMSET_H
#include "Context.h"
#include "Atom.h"
#include "Species.h"
//#include "Species.h"
#include <list>
#include <map>
#include <string>
using namespace std;
class Species;
class AtomSet
......@@ -25,6 +27,8 @@ class AtomSet
int nel_;
map<string,int> na_; // na_[sp_name]: number of atoms of species sp_name
map<string,int> isp_; // isp_[sp_name]: index of species sp_name
map<string,int> is_; // is_[atom_name]: is index of atom atom_name
map<string,int> ia_; // ia_[atom_name]: ia index of atom atom_name
vector<string> spname; // spname[is]: name of species is
......@@ -44,15 +48,18 @@ class AtomSet
Species *findSpecies(string name) const;
void listAtoms(void) const;
void listSpecies(void) const;
int na(string spname) const; // number of atoms of species spname
int na(const string& spname) const; // number of atoms of species spname
int na(int is) const; // number of atoms of species is
int isp(string spname) const; // index of species spname
int isp(const string& spname) const; // index of species spname
int is(const string& atom_name) const;
int ia(const string& atom_name) const;
int nel(void) const { return nel_; };
int nsp(void) const { return species_list.size(); }
void get_positions(vector<vector<double> >& tau) const;
void set_positions(const vector<vector<double> >& tau);
void get_velocities(vector<vector<double> >& vel) const;
void set_velocities(const vector<vector<double> >& vel);
void sync(void);
void reset_velocities(void);
int size(void);
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