File: magnetic_ff.py

package info (click to toggle)
python-periodictable 2.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,068 kB
  • sloc: python: 13,338; makefile: 103; sh: 92; javascript: 7
file content (16 lines) | stat: -rw-r--r-- 428 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import numpy as np
import matplotlib.pyplot as plt
import periodictable

fig_width = 10
fig_height = 8
fig_size =  [fig_width,fig_height]
params = {'figure.figsize': fig_size}
plt.rcParams.update(params)
Fe_2 = periodictable.Fe.ion[2]
Q = np.linspace(0,16,200)
M = Fe_2.magnetic_ff[Fe_2.charge].j0_Q(Q)
plt.xlabel(r'Magnetic Form Factor for Fe')
plt.ylabel(r'$\AA^{-1}$')
plt.title('Ion specific property for Fe')
plt.plot(Q,M)