Differences

This shows you the differences between two versions of the page.

Link to this comparison view

out_xtl [2016/10/16 12:51] (current)
johnsoevans created
Line 1: Line 1:
 +Output .xtl Format
  
 +Write out atoms in the old insight .xtl format, which is still used by some packages.
 +
 +<code topas>​macro Out_xtl(file) {
 +   out file
 +   ​Out_String("​TITLE ")
 +   ​Out(Get(phase_name))
 +   ​Out_String("​\nCELL\n"​)
 +   ​Out(Get(a),​ "​%9.4f"​)
 +   ​Out(Get(b),​ "​%9.4f"​)
 +   ​Out(Get(c),​ "​%9.4f"​)
 +   ​Out(Get(al),​ "​%9.4f"​)
 +   ​Out(Get(be),​ "​%9.4f"​)
 +   ​Out(Get(ga),​ "​%9.4f"​)
 +   ​Out_String("​\nATOMS"​)
 +   ​Out_String("​\nNAME X Y Z")
 +   ​atom_out file append
 +   load out_record out_fmt out_eqn
 +   {
 +      "​\n%-4s"​ = Get_From_String(Get(current_atom),​ atom);
 +      "​%11.8f " = Get_From_String(Get(current_atom),​ x);
 +      " %11.8f " = Get_From_String(Get(current_atom),​ y);
 +      " %11.8f " = Get_From_String(Get(current_atom),​ z);
 +   }
 +   out file append
 +   ​Out_String("​\nEOF"​)
 +}</​code>​

Personal Tools