Out_CIF_crystalmaker

Description: output cif file with adps for crystalmaker

Comment: removes a couple of default topas cif items that crystalmaker doesn't like reading so saves editing files

Contributed by: John Evans

macro Out_CIF_crystalmaker(file) {Out_CIF_crystalmaker_1(file) Out_CIF_crystalmaker_2(file)}
macro Out_CIF_crystalmaker_1(file)
{
   out file
      Out_String("\ndata_")
      Out(Get(phase_name), "\n_chemical_name_mineral ?%s?")
      Out(Get(a), "\n_cell_length_a  %V")
      Out(Get(b), "\n_cell_length_b  %V")
      Out(Get(c), "\n_cell_length_c  %V")
      Out(Get(al), "\n_cell_angle_alpha %V")
      Out(Get(be), "\n_cell_angle_beta  %V")
      Out(Get(ga), "\n_cell_angle_gamma %V")
      Out(Get(cell_volume), "\n_cell_volume %V")
 
      Out(Get(sp_grp_char), "\n_space_group %s")
 
      Out_String("\nloop_\n_symmetry_equiv_pos_as_xyz")
      Out(Get(sp_xyzs_txt),  "%s")
 
		Out_String("\nloop_")
         Out_String("\n_atom_site_label")
'         Out_String("\n_atom_site_type_symbol")
'         Out_String("\n_atom_site_symmetry_multiplicity")
         Out_String("\n_atom_site_fract_x")
         Out_String("\n_atom_site_fract_y")
         Out_String("\n_atom_site_fract_z")
         Out_String("\n_atom_site_occupancy")
         Out_String("\n_atom_site_B_iso_or_equiv")
         atom_out file append
            load out_record out_fmt out_eqn
            {
               "\n%s" = Get_From_String(Get(current_atom), site);
'					" %s" = Get_From_String(Get(current_atom), atom);
'               " %3.0f" = Get_From_String(Get(current_atom), num_posns);
					" %V" = Get_From_String(Get(current_atom), x);
               " %V" = Get_From_String(Get(current_atom), y);
               " %V" = Get_From_String(Get(current_atom), z);
               " %V" = Get_From_String(Get(current_atom), occ);
               " %V" = Get_From_String(Get(current_atom), beq);
            }
}
 
macro Out_CIF_crystalmaker_2(file)
{
   out file append
      Out_String("\nloop_")
      Out_String("\n_atom_site_aniso_label")
'      Out_String("\n_atom_site_type_symbol")
      Out_String("\n_atom_site_aniso_U_11")
      Out_String("\n_atom_site_aniso_U_22")
      Out_String("\n_atom_site_aniso_U_33")
      Out_String("\n_atom_site_aniso_U_12")
      Out_String("\n_atom_site_aniso_U_13")
      Out_String("\n_atom_site_aniso_U_23")
      atom_out file append
         load out_record out_fmt out_eqn
         {
            "\n%s" = Get_From_String(Get(current_atom), site);
'            " %s" = Get_From_String(Get(current_atom), atom);
            " %V" = Get_From_String(Get(current_atom), u11);
            " %V" = Get_From_String(Get(current_atom), u22);
            " %V" = Get_From_String(Get(current_atom), u33);
            " %V" = Get_From_String(Get(current_atom), u12);
            " %V" = Get_From_String(Get(current_atom), u13);
            " %V" = Get_From_String(Get(current_atom), u23);
          }
}

Personal Tools