Skip to content

Commit

Permalink
ENH: added --save_res flag to pxrd_calculator to compare matadors rep…
Browse files Browse the repository at this point in the history
…resentation of the structure with the input cif
  • Loading branch information
ml-evs committed Jun 7, 2020
1 parent 84a63a6 commit d6ba5d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/pxrd_calculator
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ def compute_pxrd(**kwargs):
for doc in strucs:
doc.pxrd.save_peaks(doc.root_source + '_pxrd_peaks.dat')

if kwargs.get('save_res'):
from matador.export import doc2res
for doc in strucs:
doc2res(doc, doc.root_source + '.res', info=False)


if __name__ == '__main__':
parser = argparse.ArgumentParser(
Expand All @@ -91,6 +96,8 @@ if __name__ == '__main__':
parser.add_argument('--savefig', type=str, help='save a plot to this file, e.g. "pxrd.pdf"')
parser.add_argument('-t', '--two_theta_range', nargs=2, type=float)
parser.add_argument('--spg_labels', action='store_true', help='label with spacegroup-formula instead of filename')
parser.add_argument('--save_res', action='store_true',
help='save a res file with a closer interpretation of the structure used')
parser.add_argument('--save_patterns', action='store_true', help='save a .dat file with the xy pattern for each structure')
parser.add_argument('--save_peaks', action='store_true', help='save a .txt file per structure with a list of peaks')
parser.add_argument('--rugplot', action='store_true')
Expand Down

0 comments on commit d6ba5d1

Please sign in to comment.