Changeset 4078 for trunk/G2shapes.py


Ignore:
Timestamp:
Aug 4, 2019 3:36:50 PM (2 years ago)
Author:
vondreele
Message:

some finish uo on SHAPES

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/G2shapes.py

    r4077 r4078  
    262262        return;
    263263   
    264     # Write P(r) with SD and calculated value.
    265    
    266     def pr_writer(aList_pr,aList_r,aList_pr_model,outfile_pr):
    267    
    268         num_pr = len(aList_pr)
    269    
    270         file = open(outfile_pr,'w')
    271         file.write('#\n')
    272    
    273         i = 0
    274         while i < num_pr:
    275        
    276             r = float(aList_r[i])
    277             pr = float(aList_pr[i])
    278             pr_calc = float(aList_pr_model[i])
    279             aString = str(r) + ' ' + str(pr) + ' ' + str(pr_calc) + '\n'
    280             file.write(aString)
    281    
    282             i = i + 1
    283    
    284         file.close()
    285    
    286         return;
     264#    # Write P(r) with SD and calculated value.
     265#   
     266#    def pr_writer(aList_pr,aList_r,aList_pr_model,outfile_pr):
     267#   
     268#        num_pr = len(aList_pr)
     269#   
     270#        file = open(outfile_pr,'w')
     271#        file.write('#\n')
     272#   
     273#        i = 0
     274#        while i < num_pr:
     275#       
     276#            r = float(aList_r[i])
     277#            pr = float(aList_pr[i])
     278#            pr_calc = float(aList_pr_model[i])
     279#            aString = str(r) + ' ' + str(pr) + ' ' + str(pr_calc) + '\n'
     280#            file.write(aString)
     281#   
     282#            i = i + 1
     283#   
     284#        file.close()
     285#   
     286#        return;
    287287   
    288288    # Write a set of points as a pseudo-PDB file
     
    11161116    Phases = []
    11171117    Patterns = []
     1118    PRcalc = []
    11181119   
    11191120#    # Parse
     
    13811382        file_pr = prefix + 'pr_calc_' + file_no + '.dat'
    13821383        file_psv = prefix + 'psv_shape_' + file_no + '.pdb'
    1383         file_intensity = prefix + 'intensity_' + file_no + '.dat'
     1384#        file_intensity = prefix + 'intensity_' + file_no + '.dat'
    13841385   
    13851386        # Setup initial bead distribution
     
    18281829   
    18291830        # Write input and model P(r)
    1830         pr_writer(aList_pr,aList_r,aList_pr_model,file_pr)
     1831#        pr_writer(aList_pr,aList_r,aList_pr_model,file_pr)
     1832        PRcalc.append([aList_r,aList_pr,aList_pr_model,])
    18311833   
    18321834        # Calculate comparison versus intensities
     
    19151917    file.close()
    19161918
    1917     return Phases,Patterns
     1919    return Phases,Patterns,PRcalc
    19181920   
    19191921   
Note: See TracChangeset for help on using the changeset viewer.