Changeset 4079 for trunk/G2shapes.py


Ignore:
Timestamp:
Aug 5, 2019 3:33:15 PM (2 years ago)
Author:
vondreele
Message:

modify SHAPES for better output to GSAS-II
begin plotting capability for SHAPES output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/G2shapes.py

    r4078 r4079  
    10831083    print (aString)
    10841084   
    1085     aList_summary = []
    1086     aList_summary.append(version_aString)
    1087     aList_summary.append(str(localtime))
     1085#    aList_summary = []
     1086#    aList_summary.append(version_aString)
     1087#    aList_summary.append(str(localtime))
    10881088   
    10891089    ######################
     
    13771377                         
    13781378        aString  = 'Trial:' + file_no
    1379         aList_summary.append(aString)
     1379#        aList_summary.append(aString)
    13801380   
    13811381        file_beads = prefix + 'beads_' + file_no + '.pdb'
    1382         file_pr = prefix + 'pr_calc_' + file_no + '.dat'
     1382#        file_pr = prefix + 'pr_calc_' + file_no + '.dat'
    13831383        file_psv = prefix + 'psv_shape_' + file_no + '.pdb'
    13841384#        file_intensity = prefix + 'intensity_' + file_no + '.dat'
     
    17801780        print (aString)
    17811781   
     1782        Phases.append([file_beads.split('.')[0],aList_beads_x,aList_beads_y,aList_beads_z])
    17821783        # Write out beads as pseudo a PDB file
    1783         Phases.append({'pname':file_beads.split('.')[0],
    1784             'Atoms':[aList_beads_x,aList_beads_y,aList_beads_z,file_beads]})
    17851784        if pdbOut:
    17861785            pdb_writer(aList_beads_x,aList_beads_y,aList_beads_z,file_beads,aString)
     
    18301829        # Write input and model P(r)
    18311830#        pr_writer(aList_pr,aList_r,aList_pr_model,file_pr)
    1832         PRcalc.append([aList_r,aList_pr,aList_pr_model,])
     1831        PRcalc.append([aList_r,aList_pr,aList_pr_model,delta_hist_sum])
    18331832   
    18341833        # Calculate comparison versus intensities
     
    18481847   
    18491848            # Write output intensity file
    1850             Patterns.append([aList_q,aList_i,aList_i_calc,aString])
     1849            Patterns.append([aList_q,aList_i,aList_i_calc,rvalue])
    18511850#            write_all_data(file_intensity,aList_q,aList_i,aList_i_calc,aString)
    18521851   
     
    18691868                  ' PSV:' + str(fraction_psv)
    18701869   
    1871         Phases.append({'pname':file_psv.split('.')[0],
    1872             'Atoms':[aList_box_x,aList_box_y,aList_box_z]})
     1870        Phases.append([file_psv.split('.')[0],aList_box_x,aList_box_y,aList_box_z])
    18731871        if pdbOut:
    18741872            pdb_writer(aList_box_x,aList_box_y,aList_box_z,file_psv,aString)
     
    18781876        aString = 'P(r) dif:' + str(delta_hist_sum) + ' E:' \
    18791877                         + str(vdw_all) + ' CHISQ:' + str(chi_sq) + ' PSV:' + str(fraction_psv)
    1880         aList_summary.append(aString)               
     1878#        aList_summary.append(aString)               
    18811879   
    18821880        i_soln = i_soln + 1
     
    19011899    print (aString)
    19021900                         
    1903     aList_summary.append(str(localtime))
    1904    
    1905     # Create summary
    1906    
    1907     aFile_log = prefix + 'shapes_summary.log'
    1908     num_lines = len(aList_summary)
    1909    
    1910     file = open(aFile_log,'w')
    1911     i = 0
    1912     while i < num_lines:
    1913         aString = str(aList_summary[i])
    1914         file.write(aString)
    1915         file.write('\n')
    1916         i = i + 1
    1917     file.close()
     1901#    aList_summary.append(str(localtime))
     1902#   
     1903#    # Create summary
     1904#   
     1905#    aFile_log = prefix + 'shapes_summary.log'
     1906#    num_lines = len(aList_summary)
     1907#   
     1908#    file = open(aFile_log,'w')
     1909#    i = 0
     1910#    while i < num_lines:
     1911#        aString = str(aList_summary[i])
     1912#        file.write(aString)
     1913#        file.write('\n')
     1914#        i = i + 1
     1915#    file.close()
    19181916
    19191917    return Phases,Patterns,PRcalc
Note: See TracChangeset for help on using the changeset viewer.