summaryrefslogtreecommitdiff
path: root/cad/src/experimental/CoNTub/C++/W1.h
blob: 259bdb6cafd29cd3df2d838e423d0aa8343f3b73 (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
// Copyright 2006-2007 Nanorex, Inc.  See LICENSE file for details. 
#ifndef W1_H_INCLUDED
#define W1_H_INCLUDED

#define HYDROGEN 1
#define NITROGEN 7

#define LOGGING  0

#include "MoleculaT.h"
#include "String.h"

class W1
{
 protected:
    W1(void) { }
    void finish(int terminator) {
	molecule.centrar ();
	molecule.ponconec ();
	if (terminator == HYDROGEN) {
	    molecule.cierraH ();
	    molecule.ponconec ();
	} else if (terminator == NITROGEN) {
	    molecule.cierraN ();
	    molecule.ponconec ();
	}
    }
    void logInfo(String x) { }

 public:
    MoleculaT molecule;
    /*
     * (a, b) - nanotube chirality
     * c - nanotube length in angstroms
     * terminator - an element number for terminating atoms, ignored if not HYDROGEN or NITROGEN
     */
    W1(int a, int b, double c, int terminator);
};

#endif