Пример #1
0
for ind_mol in xrange(len(mols)):
    mol = mols[ind_mol].group
    kink  = mols[ind_mol].kinked
    klocation = mols[ind_mol].klocation
    
    imgfolder2=paths + '/' + imgfolder + '/diffusion' + str(mol) 
    
    try:
        os.mkdir(imgfolder2)
    except:
        pass

    # READ IN TIME-DEP CENTER OF MASS OF H**O                              
    inputfile = os.path.join(paths,datafolder,'runninghomoCOMVEL_mol' + str(mol) + '.csv')
    lhomo = mf.readinCSV(inputfile, 1)
    times[:,ind_mol] =np.asarray([x[0] for x in lhomo], dtype="float")     #ALREADY IN ANGSTROM
    COMx[:,ind_mol] = np.asarray([x[1] for x in lhomo], dtype="float")     #ALREADY IN ANGSTROM
    COMy[:,ind_mol] = np.asarray([x[2] for x in lhomo], dtype="float")     #ALREADY IN ANGSTROM
    COMz[:,ind_mol] = np.asarray([x[3] for x in lhomo], dtype="float")     #ALREADY IN ANGSTROM
    

    # READ IN END-to-END VECTOR(S)
    endendfile = os.path.join(paths,datafolder, 'runningENDEND_mol' + str(mol) + '.csv')
    lee = mf.readinCSV(endendfile, 1)
    times[:,ind_mol] =np.asarray([x[0] for x in lee], dtype="float")
    BEGeex[:,ind_mol] = np.asarray([x[1] for x in lee], dtype="float")
    BEGeey[:,ind_mol] = np.asarray([x[2] for x in lee], dtype="float")
    BEGeez[:,ind_mol] = np.asarray([x[3] for x in lee], dtype="float")
    ENDeex[:,ind_mol] = np.asarray([x[4] for x in lee], dtype="float")
    ENDeey[:,ind_mol] = np.asarray([x[5] for x in lee], dtype="float")
Пример #2
0
        if os.path.exists(os.path.join(paths,frontname)):
            
            os.chdir(os.path.join(paths,frontname))

            comxnumrun=[]; comynumrun=[]; comznumrun=[]
            
            print "Frame " + str(i) + " " +str(mol)
 
            com_file='group_' + str(mol) + '_MOL.com'
            homocom_file='homoCOMxyz_mol' + str(mol) + '.csv' 
            int_file='inertiaOUT_mol' + str(mol)+ '.csv'
            gyr_file='gyration2OUT_mol' + str(mol)+ '.csv'
            uv_file = os.path.join(paths, datafolder, 'runningUNITVECTOR_mol' + str(mol) + '.csv')
                
            # read in files
            linert = mf.readinCSV(int_file, 0)
            lgyrate = mf.readinCSV(gyr_file, 0)
            lcom = mf.readinCSV(com_file, 0)
            lhomocom = mf.readinCSV(homocom_file, 1)
            luv = mf.readinCSV(uv_file, 1)
            
            COMhx[i-1][ind_mol]=lhomocom[0][0]   
            COMhy[i-1][ind_mol]=lhomocom[0][1]     
            COMhz[i-1][ind_mol]=lhomocom[0][2]    #ALREADY IN ANGSTROM

            INERTprincphx[i-1][ind_mol]=linert[3][0]
            INERTprincphy[i-1][ind_mol]=linert[4][1]
            INERTprincphz[i-1][ind_mol]=linert[5][2]

            GYRATEprincphx[i-1][ind_mol]=lgyrate[3][0]
            GYRATEprincphy[i-1][ind_mol]=lgyrate[4][1]
Пример #3
0
imppos_cc_plus = np.zeros([steps-1,len(mols)], dtype=float)
imppos_ccMAG_plus = np.zeros([len(mols),1], dtype=float)


for ind_mol in xrange(len(mols)):
    mol = mols[ind_mol].group
    kink  = mols[ind_mol].kinked
    klocation = mols[ind_mol].klocation

    dihval_ccMAG = np.zeros([ steps,dihedrals], dtype=float)
    dihval_cc = np.zeros([ steps,dihedrals], dtype=float)
    dihval_cce = np.zeros([ steps,1], dtype=float)
    dihval =  np.zeros([steps, dihedrals], dtype=float)
            
    infile1 = os.path.join(paths, datafolder, 'runningInert_mol' + str(mol)+ '.csv')
    linert = mf.readinCSV(infile1, 1)
    times[:,ind_mol] = np.asarray([x[0] for x in linert], dtype="float")
    Ixx[:,ind_mol] = np.asarray([x[1] for x in linert], dtype="float")
    Iyy[:,ind_mol] = np.asarray([x[2] for x in linert], dtype="float")
    Izz[:,ind_mol] =np.asarray([x[3] for x in linert], dtype="float")
   
        
    infile2 = os.path.join(paths, datafolder, 'runningGyrate_mol' + str(mol)+ '.csv')
    lg2 = mf.readinCSV(infile2,1)
    G2xx[:,ind_mol] =np.asarray([x[1] for x in lg2], dtype="float")
    G2yy[:,ind_mol] =np.asarray([x[2] for x in lg2], dtype="float")
    G2zz[:,ind_mol] =np.asarray([x[3] for x in lg2], dtype="float")

        
    infile3 = os.path.join(paths, datafolder, 'runninghomoCOMVEL_mol' + str(mol) + '.csv')
    lcomh = mf.readinCSV(infile3, 1)
Пример #4
0
    eeRrun_nL2 = np.zeros([3, len(timelinspace)], dtype=float)
    eeRrun_n = np.zeros([3, len(timelinspace)], dtype=float)
    kinkatom1 = np.zeros([3, len(timelinspace)], dtype=float)
    kinkatom2 = np.zeros([3, len(timelinspace)], dtype=float)
    kloc = np.zeros([3, len(timelinspace)], dtype=float)
    
    for i in mf.itertools(1,1):
     frontname = 'frame_' + str(i) + '_groups'
     if os.path.exists(os.path.join(paths, frontname)):
       print "Frame " + str(i) + " mol-" + str(mol)
       
       os.chdir(os.path.join(paths,frontname))

       com_file = 'group_' + str(mol) + '_MOL.com'

       lcom = mf.readinCSV(com_file, 0)
       weight= np.asarray([x[0] for x in lcom], dtype="int")
       xcoords = np.asarray([x[1] for x in lcom], dtype="float")
       ycoords = np.asarray([x[2] for x in lcom], dtype="float")
       zcoords =np.asarray([x[3] for x in lcom], dtype="float")    #METER IN FILE

       locL1end[0, i-1] = xcoords[L1end-1] ; locL1end[1, i-1] = ycoords[L1end-1] ;  locL1end[2, i-1] = zcoords[L1end-1]
       locL2end[0, i-1] = xcoords[L2end-1] ; locL2end[1, i-1] = ycoords[L2end-1] ;  locL2end[2, i-1] = zcoords[L2end-1]

        
       if kink == 1:	
          kinkatom1[0,i-1] = xcoords[klocation[0]];                            
          kinkatom1[1,i-1] = ycoords[klocation[0]]; 
          kinkatom1[2,i-1] = zcoords[klocation[0]];

          kinkatom2[0,i-1] = xcoords[klocation[1]]; 
Пример #5
0

paths = os.getcwd()

for ind_mol in xrange(len(mols)):
    mol = mols[ind_mol].group
    kink  = mols[ind_mol].kinked
    klocation = mols[ind_mol].klocation

    """ regular autocorrelation functions"""
    Inertinfile = os.path.join(paths, datafolder, 'acorrInert_mol' + str(mol) + ".csv")
    Gyrateinfile = os.path.join(paths, datafolder, 'acorrGyrate_mol' + str(mol) + ".csv")
    cominfile = os.path.join(paths, datafolder, 'acorrHOMOCOMVEL_mol' + str(mol) + ".csv")
    energiesinfile  = os.path.join(paths, datafolder, 'acorrEnergies_mol' + str(mol) + ".csv")

    linert = mf.readinCSV(Inertinfile, 1)
    times[:,ind_mol] = np.asarray([x[0] for x in linert], dtype="float")
    Ixxac[:,ind_mol] = np.asarray([x[1] for x in linert], dtype="float")
    Iyyac[:,ind_mol] = np.asarray([x[2] for x in linert], dtype="float")
    Izzac[:,ind_mol] = np.asarray([x[3] for x in linert], dtype="float")
   
    lgyrate = mf.readinCSV(Gyrateinfile, 1)
    G2xxac[:,ind_mol] = np.asarray([x[1] for x in lgyrate], dtype="float")
    G2yyac[:,ind_mol] = np.asarray([x[2] for x in lgyrate], dtype="float")
    G2zzac[:,ind_mol] = np.asarray([x[3] for x in lgyrate], dtype="float")


    lcom = mf.readinCSV(cominfile, 1)                                
    comxac[:,ind_mol] = np.asarray([x[1] for x in lcom], dtype="float")
    comyac[:,ind_mol] = np.asarray([x[2] for x in lcom], dtype="float")
    comzac[:,ind_mol] = np.asarray([x[3] for x in lcom], dtype="float")