• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

kalzium

Avogadro::Atom

Avogadro::Atom Class Reference

#include <primitive.h>

Inheritance diagram for Avogadro::Atom:

Inheritance graph
[legend]

List of all members.


Detailed Description

Atom Class.

Author:
Donald Ephraim Curtis
The Atom class is a Primitive subclass that provides a wrapper around OpenBabel::OBAtom. This class is provided to give more control of the OpenBabel::OBAtom class through slots/signals provided by the Primitive superclass.

Definition at line 161 of file src/primitive.h.


Public Member Functions

 Atom (QObject *parent=0)
const Eigen::Vector3d & pos () const
void setPos (const Eigen::Vector3d &vec)

Constructor & Destructor Documentation

Avogadro::Atom::Atom ( QObject *  parent = 0  ) 

Constructor.

Parameters:
parent the object parent.

Definition at line 105 of file primitive.cpp.


Member Function Documentation

const Eigen::Vector3d& Avogadro::Atom::pos (  )  const [inline]

Returns the position of the atom, as a Eigen::Vector3d.

This is similar to the OBAtom::GetVector() method, which returns the position as a OpenBabel::vector3.

Rationale for inlining: this method only does a cast on the return value of OBAtom::GetVector(). The memory layouts of the types between which it casts are not likely to change: both types represent 3D vectors of doubles, and there's only one sane way to represent them: struct{ double x,y,z; }.

Returns:
OBAtom::GetVector() but reinterpret_casted as a const Eigen::Vector3d &

Definition at line 183 of file src/primitive.h.

void Avogadro::Atom::setPos ( const Eigen::Vector3d &  vec  )  [inline]

Sets the position of the atom, from a Eigen::Vector3d.

This is similar to the OBAtom::SetVector() method, which sets the position from a OpenBabel::vector3.

Rationale for inlining: this method only does a cast on the argument of OBAtom::SetVector(). The memory layouts of the types between which it casts are not likely to change: both types represent 3D vectors of doubles, and there's only one sane way to represent them: struct{ double x,y,z; }.

Definition at line 196 of file src/primitive.h.


The documentation for this class was generated from the following files:
  • src/primitive.h
  • primitive.cpp

kalzium

Skip menu "kalzium"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal