Class: Aims::Gallium
Instance Attribute Summary
Attributes inherited from Geometry
Instance Method Summary collapse
-
#initialize(a, b, c, u, v) ⇒ Gallium
constructor
A new instance of Gallium.
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
Constructor Details
#initialize(a, b, c, u, v) ⇒ Gallium
Returns a new instance of Gallium.
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/aims/Tetragonal.rb', line 20 def initialize(a, b, c, u, v) v1 = Vector[a/2.0, -b/2.0, 0] v2 = Vector[a/2.0, b/2.0, 0] v3 = Vector[0, 0, c] atoms = [Atom.new(0, u*b, v*c, "Ga"), Atom.new(0, -u*b, -v*c, "Ga"), Atom.new(0, (0.5+u)*b, (0.5-v)*c, "Ga"), Atom.new(0, (0.5-u)*b, (0.5+v)*c, "Ga")] super(atoms, [v1, v2, v3]) end |