# Re: [Wien] EFG dependence on magnetic field

```
```
Many thanks for your guidance. Actually my system has magnetic (2) and non-magnetic (3) species. As B_ext. means we are apply magnetic field on the whole system then why do we need to select natorb = 2 ?
```
```
Bext is applied to the iatoms (i.e., in atomic spheres) that you specify in case.inorb. The program searches for file case.vorbup, if it finds it, Bext energy is add to Vxc in atomic spheres and in interstitial region [ http://www.wien2k.at/reg_user/textbooks/orbital_potentials.pdf (section "4.1 LAPW0 package" on page 6)].
```
```
Secondly could you please clarify to me about "adjusting the "direction of Bext in terms of lattice vectors" line in case.inorb.". Any example please or guidance that how to make it.
```
For example,

```
y = x*tan(theta) = 1*tan(32 degrees) = 0.62487 [ https://en.wikipedia.org/wiki/Trigonometry ]
```
```
Consider a cubic lattice with the "direction of Bext in terms of lattice vectors" set to:
```
1 0.62487 0

```
Calculation of the angle between vector (1,0,0) and vector (1,0.62487,0) with octave:
```
octave:1> a=[1 0 0]
a =
1   0   0
octave:2> b=[1 0.62487 0]
b =
1.00000   0.62487   0.00000
angle_deg =  32.000

This gives an angle of 32 degrees with respect to the (100) axis.

```
```

```
```_______________________________________________
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
```