MPQC  3.0.0-alpha
formula.h
1 //
2 // formula.h --- class for calculation molecular formulae
3 //
4 // Copyright (C) 1997 Limit Point Systems, Inc.
5 //
6 // Author: Edward Seidl <seidl@janed.com>
7 // Maintainer: LPS
8 //
9 // This file is part of the SC Toolkit.
10 //
11 // The SC Toolkit is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU Library General Public License as published by
13 // the Free Software Foundation; either version 2, or (at your option)
14 // any later version.
15 //
16 // The SC Toolkit is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU Library General Public License for more details.
20 //
21 // You should have received a copy of the GNU Library General Public License
22 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 //
25 
26 #ifndef _chemistry_molecule_formula_h
27 #define _chemistry_molecule_formula_h
28 
29 #include <chemistry/molecule/molecule.h>
30 
31 namespace sc {
32 
35 
40  private:
41  int natomtypes_;
42  int *Z_, *nZ_;
43  char *form_;
44 
45  void compute_atomtypes(const Molecule *m);
46  void compute_form(const Molecule *m);
47  public:
50  MolecularFormula(const Molecule *m);
51 
53 
55  const char * formula() const;
57  int natomtypes();
59  int Z(int itype);
61  int nZ(int itype);
62 };
63 
65 // end of addtogroup ChemistryMolecule
66 
67 }
68 
69 #endif
sc::MolecularFormula
The MolecularFormula class is used to calculate the molecular formula of a Molecule.
Definition: formula.h:39
sc::Molecule
The Molecule class contains information about molecules.
Definition: molecule.h:149
sc::Ref
A template class that maintains references counts.
Definition: ref.h:361
sc::MolecularFormula::Z
int Z(int itype)
Returns atomic number of given atomtypeindex.
sc::MolecularFormula::nZ
int nZ(int itype)
Returns number of atoms of given atomtypeindex.
sc::MolecularFormula::natomtypes
int natomtypes()
Returns the number of atomtypes.
sc::MolecularFormula::MolecularFormula
MolecularFormula(const Ref< Molecule > &m)
Constructors. The argument must be nonnull.
sc::MolecularFormula::formula
const char * formula() const
Returns a null terminated string containing the molecular formula.
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14

Generated at Sun Jan 26 2020 23:23:56 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.