summaryrefslogtreecommitdiff
path: root/cad/plugins/CoNTub/src/W1.h
blob: c2b8ee0c68c28c6f76c5acad1cd022aeb454fd5f (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
// Copyright 2006-2007 Nanorex, Inc.  See LICENSE file for details. 
/* $Id$ */

#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