Exemplo n.º 1
0
                header += " ]   [ <F_k(Dt)> ]  [ stdDev(F_k(Dt)) ]   [ Delta_Steps ] "
                np.savetxt(flow, tobesaved, fmt="%f %f %f %d", header=header)

            #########
            tobesaved = np.loadtxt(outName)
            plt.figure(31, [10, 6])
            plt.semilogx(tobesaved[:, 0], tobesaved[:, 1])
            ## TODO: add the error bars here, using stdDev to have their size.
            plt.title(r'Self-intermediate scattering'
                      )  #(self-spatial, 2-point temporal correlation function)
            plt.xlabel('$\Delta t$')
            plt.ylabel(r'$F_k(\Delta t)$')
            plt.ylim([0, 1])
            plt.xlim([0.01, 1e9])
            module_importPlotParams.savefig_perso(
                outName + module_importPlotParams.fsaveFigFormat())
            plt.close(31)

        ## saving the RMSD file: ##
        if compute_RMSD == True:
            tobesaved = np.zeros((len(Delta_t_range), 4))
            tobesaved[:,
                      0] = Delta_t_range * tau_KA_per_frame * every_forMemory
            tobesaved[:, 1] = RMSD_t
            tobesaved[:, 2] = RMSD_t_std
            tobesaved[:, 3] = Delta_t_range
            nonzero_indices = RMSD_t != 0
            tobesaved = tobesaved[nonzero_indices]

            outName = rootname_OBS + "RMSD_prt=" + kind + windowTag
            with open(outName, 'a') as flow:
Exemplo n.º 2
0
    plt.figure(10,[10,6])
    every_plot=1
    atom = 44
#    ts = np.arange( 0, unique_times_number ,dtype=int)
#    mask = phops[:,atom]>0
    mask_nonzero = (phops[:,atom]>p_threshold_low)
    hoptoplot = np.log(10.0*phops[mask_nonzero,atom])
    plt.plot((unique_times[mask_nonzero])[::every_plot], hoptoplot[::every_plot], ls='', marker='o', lw=2.0)
    unrolled_traj  = module_phop.unrolled_traj_func(trajectory, Lx, atom)
    unrolled_traj -= np.mean(unrolled_traj,0)
    plt.plot(unique_times[::every_plot],unrolled_traj[::every_plot]*3.0)
    plt.title(r'atom $'+str(atom)+'$')
    plt.xlabel(r'$t$')
    plt.ylabel(r'$3x,3y,3z, \log(p_{hop})$')
    outName=rootname_PHOP + "single-atom-traj-"+str(atom)
    module_importPlotParams.savefig_perso(outName+module_importPlotParams.fsaveFigFormat())
    plt.ylim([-4,2])
    outName=rootname_PHOP + "several-atoms-phop-cut"
    module_importPlotParams.savefig_perso(outName+module_importPlotParams.fsaveFigFormat())

#plt.plot(activityState[:,0], activityState[:,1])       ## XXX 

#    ### phops of all atoms over time: ####
#    ### (scatterplot of all activity)
#    ## selecting only the big phop events
#    ## we flatten the array at this point (Natoms+trajDuration)
#    plt.figure(13,[10,6])
#    print('we found ', len(decent_phop), ' decent_phop with   p >', p_threshold_low)
### scatterplot: decent_phop(t) for the decent_phop, all atoms.
#    plt.semilogy(tstoplot, decent_phop, ls='', marker='x')
#    plt.xlabel(r'$t_{event}$')