Using deformations with user defined structures¶
This example demonstrates the use of the deformations. It employs the embedded atom method (EAM) potential routine together with user defined functions [MisMehPap01]. The example also illustrates the use of XML Inclusions.
Location¶
examples/imposing_a_deformation
Input files¶
main.xml: main input file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
<?xml version="1.0" encoding="iso-8859-1"?> <job> <name> Demonstrating the usage of deformations </name> <verbosity>maximum</verbosity> <atom-types> <species>Cu</species> </atom-types> <potentials> <xi:include href="potential.xml" xmlns:xi="http://www.w3.org/2003/XInclude" /> </potentials> <deformations> <deformation id="lattice_constant"> <scale> 3.615 </scale> </deformation> <deformation id="tetragonal_strain"> <scale> 3.615 </scale> <matrix> <s1 x="1.05" y="0.0" z="0.0"/> <s2 x="0.0" y="1.0" z="0.0"/> <s3 x="0.0" y="0.0" z="1.0"/> </matrix> </deformation> </deformations> <structures> <user-structure id="conventional_fcc_cell1"> <pbc x="true" y="true" z="true" /> <cell> <a1 x="1" y="0" z="0" /> <a2 x="0" y="1" z="0" /> <a3 x="0" y="0" z="1" /> <atoms> <atom type="Cu" x="0.0" y="0.0" z="0.0" reduced="true" /> <atom type="Cu" x="0.0" y="0.5" z="0.5" reduced="true" /> <atom type="Cu" x="0.5" y="0.0" z="0.5" reduced="true" /> <atom type="Cu" x="0.5" y="0.5" z="0.0" reduced="true" /> </atoms> </cell> <deformation>lattice_constant</deformation> <relax-dof> <atom-coordinates/> </relax-dof> </user-structure> <user-structure id="conventional_fcc_cell2"> <pbc x="true" y="true" z="true" /> <cell> <a1 x="1" y="0" z="0" /> <a2 x="0" y="1" z="0" /> <a3 x="0" y="0" z="1" /> <atoms> <atom type="Cu" x="0.0" y="0.0" z="0.0" reduced="true" /> <atom type="Cu" x="0.0" y="0.5" z="0.5" reduced="true" /> <atom type="Cu" x="0.5" y="0.0" z="0.5" reduced="true" /> <atom type="Cu" x="0.5" y="0.5" z="0.0" reduced="true" /> </atoms> </cell> <deformation>tetragonal_strain</deformation> <relax-dof> <atom-coordinates/> </relax-dof> </user-structure> </structures> </job>
potential.xml: initial parameter set (included in main input file via XML Inclusions)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
<eam id='elemental EAM potential' species-a='*' species-b='*'> <mapping> <pair-interaction species-a='*' species-b='*' function='V' /> <electron-density species-a='*' species-b='*' function='rho' /> <embedding-energy species='*' function='F' /> </mapping> <functions> <sum id='V'> <user-function id='V_term1'> <input-var>r</input-var> <expression> (E1*(exp(-2*alpha1*(r-r01)) - 2*exp(-alpha1*(r-r01))) + E2*(exp(-2*alpha2*(r-r02)) - 2*exp(-alpha2*(r-r02))) + delta) </expression> <derivative> E1*(2*alpha1*exp(-alpha1*(r-r01)) - 2*alpha1*exp(-2*alpha1*(r-r01))) + E2*(2*alpha2*exp(-alpha2*(r-r02)) - 2*alpha2*exp(-2*alpha2*(r-r02))) </derivative> <param name='E1'>2.01458e2</param> <param name='alpha1'>2.97758</param> <param name='r01'>0.83591</param> <param name='E2'>6.59288e-3</param> <param name='alpha2'>1.54927</param> <param name='r02'>4.46867</param> <param name='delta'>0.86225e-2</param> <screening> <user-function id='rho_screening'> <cutoff>5.50679</cutoff> <input-var>r</input-var> <expression>1 - 1/(1 + ((r - cutoff) / h)^4)</expression> <derivative>4 * h^4 * (r-cutoff)^3 / ((h^4 + (r-cutoff)^4)^2)</derivative> <param name='h'>0.50037</param> </user-function> </screening> </user-function> <user-function id='V_term2'> <cutoff>5.50679</cutoff> <input-var>r</input-var> <expression> - (r < rs1 ? S1*(rs1-r)^4 : 0) - (r < rs2 ? S2*(rs2-r)^4 : 0) - (r < rs3 ? S3*(rs3-r)^4 : 0) </expression> <derivative> - (r < rs1 ? -4*S1*(rs1-r)^3 : 0) - (r < rs2 ? -4*S2*(rs2-r)^3 : 0) - (r < rs3 ? -4*S3*(rs3-r)^3 : 0) </derivative> <param name='rs1'>2.24000</param> <param name='rs2'>1.80000</param> <param name='rs3'>1.20000</param> <param name='S1'>4.00000</param> <param name='S2'>40.00000</param> <param name='S3'>1.15000e3</param> </user-function> </sum> <user-function id='rho'> <input-var>r</input-var> <expression>a * exp(-beta1*(r - r03)^2) + exp(-beta2*(r - r04))</expression> <derivative>beta2*(-exp(-beta1*(r-r04))) - 2*a*beta1*(r-r03)*exp(-beta1*(r-r03)^2)</derivative> <param name='a'>3.80362</param> <param name='r03'>-2.19885</param> <param name='r04'>-2.61984e2</param> <param name='beta1'>0.17394</param> <param name='beta2'>5.35661e2</param> <screening> <user-function id='rho_screening'> <cutoff>5.50679</cutoff> <input-var>r</input-var> <expression>1 - 1/(1 + ((r - cutoff) / h)^4)</expression> <derivative>4 * h^4 * (r-cutoff)^3 / ((h^4 + (r-cutoff)^4)^2)</derivative> <param name='h'>0.5</param> </user-function> </screening> </user-function> <user-function id='F'> <input-var>rho</input-var> <expression> (rho < 1) ? (F0 + 0.5*F2*(rho - 1)^2 + q1*(rho-1)^3 + q2*(rho-1)^4 + q3*(rho-1)^5 + q4*(rho-1)^6) : (F0 + 0.5*F2*(rho - 1)^2 + q1*(rho-1)^3 + Q1*(rho-1)^4) / (1 + Q2*(rho-1)^3) </expression> <derivative> (rho < 1) ? (rho - 1)*(F2 + 3*q1*(rho-1) + 4*q2*(rho-1)^2 + 5*q3*(rho-1)^3 + 6*q4*(rho-1)^4) : (F2*(rho-1) + 3*q1*(rho-1)^2 + 4*Q1*(rho-1)^3)/(Q2*(rho-1)^3 + 1) - (3*Q2*(rho-1)^2 * (F0 + 0.5*F2*(rho-1)^2 + q1*(rho-1)^3 + Q1*(rho-1)^4)) / ((Q2*(rho-1)^3 + 1)^2) </derivative> <param name='F0'>-2.3</param> <param name='F2'>1.4</param> <param name='q1'>-1.3</param> <param name='q2'>-0.9</param> <param name='q3'>1.8</param> <param name='q4'>3.0</param> <param name='Q1'>0.4</param> <param name='Q2'>0.3</param> </user-function> </functions> </eam>
Output¶
The final properties (as well as parameters) are written to standard output.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
This is program version 0.1.6 Reading job file main.xml ------------------------------------------------------- Parsing input file(s) ------------------------------------------------------- EAM potential - maximum cutoff : 5.50679 Neighbor lists of structure 'conventional_fcc_cell1' will be built for the first time. Neighbor lists of structure 'conventional_fcc_cell2' will be built for the first time. ------------------------------------------------------- Computing structure properties Relaxing atomic d.o.f. of structure conventional_fcc_cell1 (#dof=9): Neighbor lists of structure 'conventional_fcc_cell1' need to be rebuilt because of cell deformation (skin=0, cell_def=0 threshold=0). force_rlx_iter=1 E=-14.2315 fnorm=9.68342e-17 Structure 'conventional_fcc_cell1': total-energy: -14.2315 eV atomic-energy: -3.55787 eV/atom total-volume: 47.2416 A^3 atomic-volume: 11.8104 A^3/atom Relaxing atomic d.o.f. of structure conventional_fcc_cell2 (#dof=9): Neighbor lists of structure 'conventional_fcc_cell2' need to be rebuilt because of cell deformation (skin=0, cell_def=0 threshold=0). force_rlx_iter=1 E=-14.17 fnorm=5.74558e-17 Structure 'conventional_fcc_cell2': total-energy: -14.17 eV atomic-energy: -3.54249 eV/atom total-volume: 49.6037 A^3 atomic-volume: 12.4009 A^3/atom ------------------------------------------------------- -------------------------------------------------------