This is an old revision of the document!


Out_CIF_mag

Output a CIF with components of magnetic moments along x, y and z:

		macro Out_CIF_mag(file) {
		out file
 		Out_String("data_topas_output")
		Out(Get(sp_grp_char), "\n\n_mag_space_group_BNS_number %s")
		Out(Get(a), "\n_magnetic_cell_length_a  %V")
		Out(Get(b), "\n_magnetic_cell_length_b  %V")
		Out(Get(c), "\n_magnetic_cell_length_c  %V")
		Out(Get(al), "\n_magnetic_cell_angle_alpha %V")
		Out(Get(be), "\n_magnetic_cell_angle_beta  %V")
		Out(Get(ga), "\n_magnetic_cell_angle_gamma %V")	
 
		Out_String("\n\nloop_")
		Out_String("\n_magnetic_space_group_symop_id")
		Out_String("\n_magnetic_space_group_symop_operation_xyz")
		Out_String("\n_magnetic_space_group_symop_operation_mxmymz")
		Out_String("\n_magnetic_space_group_symop_operation_timereversal")
 		Out(Get(mag_sp_xyzs_txt),  "%s")
 
		Out_String("\n\nloop_")
                 Out_String("\n_magnetic_atom_site_label")
                 Out_String("\n_magnetic_atom_site_type_symbol")
                 Out_String("\n_magnetic_atom_site_fract_x")
                 Out_String("\n_magnetic_atom_site_fract_y")
                 Out_String("\n_magnetic_atom_site_fract_z")
                 Out_String("\n_magnetic_atom_site_occupancy")
                 Out_String("\n_magnetic_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);
		" %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);
                 }
 
                  out file append      
		Out_String("\n\nloop_")
		Out_String("\n_magnetic_atom_site_label")
		Out_String("\n_magnetic_atom_site_moment_crystalaxis_mx")
                 Out_String("\n_magnetic_atom_site_moment_crystalaxis_my")
                 Out_String("\n_magnetic_atom_site_moment_crystalaxis_mz")
		atom_out file append
		load out_record out_fmt out_eqn
                 {
		"\n%s" = Get_From_String(Get(current_atom), site);
		"%11.5f" = Get(a) Get_From_String(Get(current_atom), mlx);        
		"%11.5f" = Get(b) Get_From_String(Get(current_atom), mly);        
	         "%11.5f" = Get(c) Get_From_String(Get(current_atom), mlz);        
                  }	
                  }

Personal Tools