Class: Aims::Wurtzite
Instance Attribute Summary collapse
-
#anion ⇒ Object
Returns the value of attribute anion.
-
#cation ⇒ Object
Returns the value of attribute cation.
-
#lattice_const ⇒ Object
Returns the value of attribute lattice_const.
Instance Method Summary collapse
- #get_bulk ⇒ Object
-
#initialize(cation, anion, lattice_const) ⇒ Wurtzite
constructor
Initialize the wurtzite Geometry cation and anion are the atomic species occupying the two different sub-lattices.
Constructor Details
#initialize(cation, anion, lattice_const) ⇒ Wurtzite
Initialize the wurtzite Geometry cation and anion are the atomic species occupying the two different sub-lattices. lattice_const specifies the lattice constant
15 16 17 18 19 |
# File 'lib/aims/wurtzite.rb', line 15 def initialize(cation, anion, lattice_const) self.lattice_const = lattice_const self.cation = cation self.anion = anion end |
Instance Attribute Details
#anion ⇒ Object
Returns the value of attribute anion.
9 10 11 |
# File 'lib/aims/wurtzite.rb', line 9 def anion @anion end |
#cation ⇒ Object
Returns the value of attribute cation.
9 10 11 |
# File 'lib/aims/wurtzite.rb', line 9 def cation @cation end |
#lattice_const ⇒ Object
Returns the value of attribute lattice_const.
9 10 11 |
# File 'lib/aims/wurtzite.rb', line 9 def lattice_const @lattice_const end |
Instance Method Details
#get_bulk ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/aims/wurtzite.rb', line 21 def get_bulk # The lattice constant a = lattice_const c = 1.63299*a # sqrt(8/3)a # The atoms on a HCP as1 = Atom.new(0,0,0,'As') as2 = as1.displace(0.5*a, 0.33333*a, 0.5*c) ga1 = Atom.new(0.0, 0.0, c*0.386, 'Ga') ga2 = ga1.displace(0.5*a,0.33333*a, 0.5*c) # The lattice Vectors v1 = Vector[1.0, 0.0, 0.0]*a v2 = Vector[0.5, 0.5*sqrt(3), 0.0]*a v3 = Vector[0.0, 0.0, 1.0]*c # The unit cell wz = Geometry.new([as1,ga1,as2,ga2], [v1, v2, v3]) # wz.set_miller_indices(millerX, millerY, millerZ) return wz end |