|
| 1 | +import numpy as np |
| 2 | +import matplotlib.pyplot as plt |
| 3 | +import matplotlib as mpl |
| 4 | +plt.style.use('default') |
| 5 | +plt.rc("figure", facecolor="white") |
| 6 | + |
| 7 | +mtraj1=np.genfromtxt("trajectory.scnobase.001.1.out") |
| 8 | +mtraj2=np.genfromtxt("trajectory.scnobase.002.1.out") |
| 9 | +utraj1=np.genfromtxt("disptraj.scnobase.1.1.out") |
| 10 | +utraj2=np.genfromtxt("disptraj.scnobase.1.1.out") |
| 11 | +lattenergy=np.genfromtxt("lattenergy.scnobase.out") |
| 12 | +t0=0 |
| 13 | +t1=2001 |
| 14 | + |
| 15 | +# Plot the spin trajectories |
| 16 | +fig_mtraj = plt.figure() |
| 17 | +ax1 = fig_mtraj.add_subplot(111) |
| 18 | +ax1.plot(mtraj1[t0:t1,0],mtraj1[t0:t1,2], c='r', linestyle='--',linewidth=2.0) |
| 19 | +ax1.plot(mtraj1[t0:t1,0],mtraj1[t0:t1,3], c='g', linestyle='--',linewidth=2.0) |
| 20 | +ax1.plot(mtraj1[t0:t1,0],mtraj1[t0:t1,4], c='b', linestyle='--',linewidth=2.0) |
| 21 | +ax1.axis('tight') |
| 22 | +#plt.xlim([-12,12]) |
| 23 | +#plt.ylim([0,80]) |
| 24 | +plt.xticks(fontsize=16) |
| 25 | +plt.yticks(fontsize=16) |
| 26 | +plt.legend(['mx', 'my', 'mz'], fontsize=16) |
| 27 | +plt.show() |
| 28 | +fig_mtraj.savefig('figmtraj1.png', format='png', dpi=100) |
| 29 | + |
| 30 | +# Plot the displacement trajectories |
| 31 | +fig_utraj = plt.figure() |
| 32 | +ax1 = fig_utraj.add_subplot(111) |
| 33 | +ax1.plot(utraj1[t0:t1,0],utraj1[t0:t1,2], c='r', linestyle='--',linewidth=2.0) |
| 34 | +ax1.plot(utraj1[t0:t1,0],utraj1[t0:t1,3], c='g', linestyle='--',linewidth=2.0) |
| 35 | +ax1.plot(utraj1[t0:t1,0],utraj1[t0:t1,4], c='b', linestyle='--',linewidth=2.0) |
| 36 | +ax1.axis('tight') |
| 37 | +plt.xticks(fontsize=16) |
| 38 | +plt.yticks(fontsize=16) |
| 39 | +plt.legend(['ux', 'uy', 'uz'], fontsize=16) |
| 40 | +plt.show() |
| 41 | +fig_mtraj.savefig('figmtraj1.png', format='png', dpi=100) |
| 42 | + |
| 43 | +# Plot the energies of the SLD Hamiltonian |
| 44 | +fig_etraj = plt.figure() |
| 45 | +ax1 = fig_etraj.add_subplot(111) |
| 46 | +# Iter. ld_potenrg sd_potenrg sld_potenrg totpot_enrg kin_enrg tot_enrg ionic temp |
| 47 | +ax1.plot(lattenergy[t0:t1,0],lattenergy[t0:t1,1], c='r', linestyle='--',linewidth=2.0) |
| 48 | +ax1.plot(lattenergy[t0:t1,0],lattenergy[t0:t1,2], c='g', linestyle='--',linewidth=2.0) |
| 49 | +ax1.plot(lattenergy[t0:t1,0],lattenergy[t0:t1,3], c='b', linestyle='--',linewidth=2.0) |
| 50 | +ax1.plot(lattenergy[t0:t1,0],lattenergy[t0:t1,5], c='m', linestyle='--',linewidth=2.0) |
| 51 | +ax1.plot(lattenergy[t0:t1,0],lattenergy[t0:t1,6], c='k', linestyle='--',linewidth=2.0) |
| 52 | +ax1.axis('tight') |
| 53 | +plt.xticks(fontsize=16) |
| 54 | +plt.yticks(fontsize=16) |
| 55 | +plt.legend(['LL', 'SS', 'SSL', 'KIN', 'TOT'], fontsize=16) |
| 56 | +plt.show() |
| 57 | +fig_etraj.savefig('figetraj.png', format='png', dpi=100) |
0 commit comments