summaryrefslogtreecommitdiff
path: root/cad/src/experimental/CoNTub/C++/Atomo.h
blob: 12f00062e3a853b3e4158a30c86e7340475deeee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright 2006-2007 Nanorex, Inc.  See LICENSE file for details. 
#ifndef ATOMO_H_INCLUDED
#define ATOMO_H_INCLUDED

#include "pto3D.h"
#include "TabPe.h"

class Atomo
{
 public:
    pto3D vert;
    int *mconec;
    int selec;
    String etiq;
    String pers;
    double r;		//de doubles
    int tipo;
    int *mconecA;		//array de conec alternativas (para newzmat)
    int index;

    Atomo () {
	vert = pto3D (0.0, 0.0, 0.0);
	tipo = 0;
	r = 0.0;
	selec = 0;
	etiq = "  ";
	pers = "  ";
	mconec = new int[10];
	mconecA = new int[10];
	mconec[0] = 0;
	mconecA[0] = 0;
	index = -1;
    }

    Atomo (pto3D p, int t) {
	tipo = t;
	vert = p.clona ();
	etiq = periodicTable()->getSimbolo (t);
	pers = "  ";
	r = periodicTable()->getSize (t);
	mconec = new int[10];
	mconecA = new int[10];
	mconec[0] = 0;
	mconecA[0] = 0;
	index = -1;
    }

    friend std::ostream& operator<< (std::ostream& s, const Atomo& a) {
	s << "<Atom " << a.index << " " <<
	    a.vert.x << " " << a.vert.y << " " << a.vert.z << ">";
	return s;
    }
};

#endif