The LAMP Application

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

lamp_mac/

read_mag.pro

includes main-level program

Routines

prim_to_crist_unitcell, Aprim, P, at_num, x, y, z, pv, mk

atom_split, atom, num

result = PCell_To_Inv_Mat(a0, b0, c0, alpha0, beta0, gamma0)

result = Mat_to_Pcell(m, unit)

result = read_mag(inst, path, bfil, status, datp, MATsym=MATsym)

Routine details

top prim_to_crist_unitcell

prim_to_crist_unitcell, Aprim, P, at_num, x, y, z, pv, mk

** ********************** ** S. ROLS May 2011 ** input : ** ------- ** pos_atp(3,Np) = coordinates for the Np atom @ primitive cell : pos_atp(0,1)=x coordinate (0) of the second atom (1) ** x,y,z(3*Np,Np)= cartesian coordinates of the polarization vectors (first index = mode, second index = atom) ** P(3,3) = transfer matrix from primitive cell vectors to cristallographic cell ** In mathematical notation, the P matrix is expressed as: Pij= ** Here, it should be constructed as P = [[P11,P21,P31],[P12,P22,P32],[P13,P23,P33]] ** Mp = coordinate matrix of the primitive cell in cartesian ** at_num = vector containing the atomic number of the atoms ** A1p = [Mp(0,0), Mp(1,0), Mp(2,0) ] ** A2p = [Mp(0,1), Mp(1,1), Mp(2,1) ] ** A3p = [Mp(0,2), Mp(1,2), Mp(2,2) ] ** ** output : ** -------- ** pos_atp(3,Np) = coordinates for the Np atom @ primitive cell : pos_atp(0,1)=x coordinate (0) of the second atom (1) ** x,y,z(3*Np,Np*mult) = cartesian coordinates of the polarization vectors (first index = mode, second index = atom) ** at_num = vector containing the atomic number of the atoms ** M = coordinate matrix of the new cell ** A1 = [M(0,0), M(1,0), M(2,0) ] ** A2 = [M(0,1), M(1,1), M(2,1) ] ** A3 = [M(0,2), M(1,2), M(2,2) ]

Parameters

Aprim
P
at_num
x
y
z
pv
mk

top atom_split

atom_split, atom, num

** ********** ** separate an atom string such that atom=Mn34 gives atom=Mn & num=34

Parameters

atom
num

top PCell_To_Inv_Mat

result = PCell_To_Inv_Mat(a0, b0, c0, alpha0, beta0, gamma0)

******* **************** ** ** This function performs the conversion from the six cell parameters a, b, c, alpha, beta and gamma ** to the inverted cell matrix assuming that: ** - a //x ** - b in (x,y) plane ** a, b, c in Angstrom ** Alpha, beta and gamma in degree ** The inverted cell matrix allows to convert from direct coordinates to fractional coordinates.

Parameters

a0
b0
c0
alpha0
beta0
gamma0

top Mat_to_Pcell

result = Mat_to_Pcell(m, unit)

******* ************ ** pcell=Mat_to_Pcell(matrice,unit) -> pcell=[a,b,c,alpha,beta,gamma]

Parameters

m
unit

top read_mag

result = read_mag(inst, path, bfil, status, datp, MATsym=MATsym)

******* ******** ** reads atom files comming from different dyn mol applications ** and a lamp workspace "object" for use by MagDraw application ******************* Important Variables: ******************* ** WT 'title' ** W [atomic numbers] ** X,Y,Z atomic coordinates [0->1] ** A,B,C cell size Angst. ** ALPHA,BETA,GAMMA cell angles Deg. ** BND =1 tell to build bounds ** P20 =1 tell to complete molecules outside the cell ** WIDTH fraction of real atom size (default=1.) ** CSV,SPGR,IFO,MK,VMK miscellaneous magnetic,movements properties (xdatcar .G94 .D07 .GOUT .ATM .FST) ** OFFS set to 1 to eliminate first atom index ** PV !

Parameters

inst
path
bfil
status
datp

Keywords

MATsym

File attributes

Modification date: Tue Oct 1 14:36:01 2013
Lines: 1,284