Ejemplo n.º 1
0
def action(index,folder):
  dataCurFolder = []
  dataCurFolder.append([index, folder])
  dp.getTrajactory()
  dataCurFolder.append(pps.calculateRMSD())
  dataCurFolder.append(dp.getEnergyTemperaturePressure())
  return dataCurFolder
Ejemplo n.º 2
0
def action(index, folder):
    dataCurFolder = []
    dataCurFolder.append([index, folder])
    dp.getTrajactory()
    dataCurFolder.append(pps.calculateRMSD())
    dataCurFolder.append(dp.getEnergyTemperaturePressure())
    return dataCurFolder
Ejemplo n.º 3
0
def drawRMSD(ax, selected=None, label='', init=0):
    """
  Draw the KS Energy and Total Energy in the ax
  """
    systemLabel, timestep = tdp.getSystemLabelTimpstep()
    if selected == None:
        selected = range(0, tdp.getNumStep(), int(1.0 / timestep))

    tdp.splitMDCAR()
    time, distance, velocity = tdp.calculateRMSD(selected, init=init)

    #os.remove('POSCAR')
    ax.plot(time, distance, linewidth=3.0,
            label='RMSD' + label)  #,color=ma.colors[0])
    kargs = ma.getPropertyFromPosition(index=None,
                                       xlabel=r'Time(fs)',
                                       ylabel=r'RMSD($\AA$)',
                                       title='',
                                       xticks=None,
                                       yticks=None,
                                       xticklabels=None,
                                       yticklabels=None,
                                       xlimits=None,
                                       ylimits=None)
    ma.setProperty(ax, **kargs)
Ejemplo n.º 4
0
def plotRMSD(ax, label=''):
  dp.getTrajactory()
  import pyramids.process.struct as pps
  time, distance = pps.calculateRMSD()
  ax.plot(time, distance, lw=2, label=label)
  kargs=ma.getPropertyFromPosition(xlabel='Time (fs)', ylabel=r'$\langle u \rangle^\frac{1}{2}$ ($\AA$)', 
                                   title='RMSD')
  ma.setProperty(ax,**kargs)  
Ejemplo n.º 5
0
def plotRMSD(ax, label=''):
    dp.getTrajactory()
    import pyramids.process.struct as pps
    time, distance = pps.calculateRMSD()
    ax.plot(time, distance, lw=2, label=label)
    kargs = ma.getPropertyFromPosition(
        xlabel='Time (fs)',
        ylabel=r'$\langle u \rangle^\frac{1}{2}$ ($\AA$)',
        title='RMSD')
    ma.setProperty(ax, **kargs)
Ejemplo n.º 6
0
def drawRMSD(ax,selected=None, label = '', init = 0):
  """
  Draw the KS Energy and Total Energy in the ax
  """
  systemLabel,timestep = tdp.getSystemLabelTimpstep()
  if selected == None:
    selected = range(0,tdp.getNumStep(),int(1.0/timestep))
    
  tdp.splitMDCAR()
  time,distance,velocity = tdp.calculateRMSD(selected, init=init)
  
  #os.remove('POSCAR')
  ax.plot(time,distance,linewidth=3.0,label='RMSD'+ label)#,color=ma.colors[0])
  kargs = ma.getPropertyFromPosition(index=None, 
                                         xlabel=r'Time(fs)',ylabel=r'RMSD($\AA$)',title='', 
                                         xticks=None, yticks=None, 
                                         xticklabels=None, yticklabels=None,
                                         xlimits=None, ylimits=None)           
  ma.setProperty(ax, **kargs) 
Ejemplo n.º 7
0
#!/usr/bin/python
import numpy as np
from matplotlib import pyplot as plt
import pyramids.io.result as dp
import pyramids.plot.setting as ma
import pyramids.process.struct as pps



fig, axs = plt.subplots(2,1,sharex=True,sharey=False,figsize=(8,6))#
#--------------------------------------------------------------------------------------------
ax = axs[0]
dp.getTrajactory()
time, distance = pps.calculateRMSD()
ax.plot(time, distance, lw=3)
kargs=ma.getPropertyFromPosition(xlabel='Time (fs)', ylabel=r'$\langle u \rangle^\frac{1}{2}$ ($\AA$)', 
                                 title='RMSD')
ma.setProperty(ax,**kargs)
#ax.ticklabel_format(style='sci',axis='y',scilimits=[0,0])
#--------------------------------------------------------------------------------------------
ax = axs[1]
time, T, E_ks, E_tot, Vol, P  = dp.getEnergyTemperaturePressure()
ax.plot(time, T, lw=3)
kargs=ma.getPropertyFromPosition(xlabel='Time (fs)', ylabel='T (K)', 
                                 title='Temperature')
ma.setProperty(ax,**kargs)
#ax.ticklabel_format(style='sci',axis='y',scilimits=[0,0])
#--------------------------------------------------------------------------------------------
#plt.style.use('ggplot')
plt.tight_layout()
SaveName = __file__.split('/')[-1].split('.')[0]