-
Notifications
You must be signed in to change notification settings - Fork 1
/
atom.h
38 lines (30 loc) · 796 Bytes
/
atom.h
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
/*
* File: atom.h
* Author: BENSON J MA
*
* Created on June 21, 2011, 2:11 AM
*/
#pragma once
#ifndef ATOM_H
#define ATOM_H
class Chain;
class Residue;
class Atom {
public:
int id;
std::string name, element;
double * coords;
Residue * residue;
Atom(int tmp_id, std::string & tmp_name, double * tmp_coords, std::string & tmp_element);
~Atom();
// Must be friend to access private members.
friend std::ostream & operator<<(std::ostream & out, Atom atom);
friend std::ostream & operator<<(std::ostream & out, Atom * atom);
void set_coords(double * new_coords);
void set_residue(Residue * tmp_residue);
double distance_from(Atom * other_atom);
Chain * chain();
};
void test_atom();
Atom * sample_atom();
#endif /* ATOM_H */