74
The default units are Bohr with can be overridden with
75
#unit=angstrom#. The #atom_labels# array can be
76
omitted. The #atoms# and #geometry# arrays
74
The default units are Bohr which can be overridden with
75
<tt>unit=angstrom</tt>. The <tt>atom_labels</tt> array can be
76
omitted. The <tt>atoms</tt> and <tt>geometry</tt> arrays
79
As a special case, an atom can be given with the symbol <tt>Q</tt> or the
80
name <tt>charge</tt>. Such centers are treated as point charges and not
81
given basis functions. The values of the charges must be specified with a
82
<tt>charge</tt> vector in the Molecule input. Since the charge vector
83
assign charges to all centers, including atoms, it is easiest to place all
84
point charge centers first in the geometry, and then give a charge vector
85
with a number of elements equal to the number of point charges. The
86
following example shows a water molecule interacting with a point charge
92
{ atom_labels atoms geometry } = {
94
O1 O [ 0.000000000 0 0.369372944 ]
95
H1 H [ 0.783975899 0 -0.184686472 ]
96
H2 H [-0.783975899 0 -0.184686472 ]
102
This feature is designed for doing QM/MM calculations, so, by default,
103
methods will not include interactions between the <tt>Q</tt> centers when
104
computing the energy or the gradient. To include these interactions, set
105
<tt>include_qq=1</tt>.
79
107
The Molecule class has a PointGroup
80
108
member object, which also has a KeyVal constructor
81
109
that is called when a Molecule is made. The
150
// The Z that represents a "Q" type atom.
153
// If true, include the q terms in the charge and efield routines
156
// If true, include the coupling between q-q pairs when
157
// computing nuclear repulsion energy and gradients.
160
// These vectors contain the atom indices of atoms that are not type
161
// "Q" and those that are.
162
std::vector<int> q_atoms_;
163
std::vector<int> non_q_atoms_;
272
315
/// Return the maximum atomic number.
275
/// Return the molecules AtomInfo object.
318
/// Return the molecule's AtomInfo object.
276
319
Ref<AtomInfo> atominfo() const { return atominfo_; }
321
/// Returns the element name of the atom.
322
std::string atom_name(int iatom) const;
324
/// Returns the element symbol of the atom.
325
std::string atom_symbol(int iatom) const;
327
/** If include_q is true, then include the "Q" atoms in the charge and
329
void set_include_q(bool iq) { include_q_ = iq; }
330
/// Returns include_q. See set_include_q.
331
bool include_q() const { return include_q_; }
333
/** If include_qq is true, include the coupling between pairs of "Q"
334
atoms when computing nuclear repulsion energy and gradients. */
335
void set_include_qq(bool iqq) { include_qq_ = iqq; }
336
/// Returns include_qq. See set_include_qq.
337
bool include_qq() const { return include_qq_; }
339
/// Retrieve the number of "Q" atoms.
340
int n_q_atom() const { return q_atoms_.size(); }
341
/// Retrieve the "Q" atoms.
342
int q_atom(int i) const { return q_atoms_[i]; }
344
/// Retrieve the number of non-"Q" atoms.
345
int n_non_q_atom() const { return non_q_atoms_.size(); }
346
/// Retrieve the of non-"Q" atoms.
347
int non_q_atom(int i) const { return non_q_atoms_[i]; }
278
349
void save_data_state(StateOut&);