Class: Aims::Tetragonal

Inherits:
Geometry show all
Defined in:
lib/aims/Tetragonal.rb

Overview

A factory class for generating tetragonal geometries

Instance Attribute Summary

Attributes inherited from Geometry

#lattice_vectors

Instance Method Summary collapse

Methods inherited from Geometry

#<<, #[], #add_plane, #add_plane_cartesian, #add_plane_miller, #align_x, #atoms, #atoms=, #bonds, #bounding_box, #cartesian_from_miller, #center, #clear_planes, #copy, #correct, #delta, #displace, #each, #empty?, #format_geometry_in, #format_xyz, #make_bonds, #miller_from_cartesian, #periodic?, #recache_visible_atoms, #remove_atom, #remove_atoms, #remove_plane, #repeat, #rotate, #set_miller_indices, #size, #to_s

Methods included from Vectorize

#cross, #dot

Constructor Details

#initialize(species, a, c) ⇒ Tetragonal

Returns a new instance of Tetragonal.

Parameters:

  • species (String)

    The atomic species

  • a (Float)

    The length of the a vector

  • c (Float)

    The length of the c vector



8
9
10
11
12
13
14
# File 'lib/aims/Tetragonal.rb', line 8

def initialize(species, a, c)
  a = Atom.new(0,0,0,species)
  v1 = Vector[a, 0, 0]
  v2 = Vector[0, a, 0]
  v3 = Vector[a/2.0, a/2.0, c/2.0]
  super(a, [v1, v2, v3])
end