Beispiel #1
0
            min_rms, min_rrms, rep_esp_field = rms_and_rep(g.field, g.molecule,
                                                           charge_type)
            rms_list.append(min_rms)
            print("\n", min_rms, file=fc)

        # Default given as extremal values of methane CHelpG
        color_span = check_color_span(g.field.values, color_span,
                                      default=[-0.0045, 0.011])
        diff_field = difference(g.field, rep_esp_field)
        error_color_span = check_color_span(diff_field.values,
                                            error_color_span,
                                            default=[-0.0012, 0.019])

        graphs.plot_points(
            g.field, 2, title=calc, molecule=g.molecule,
            plane_eqn=graphs.plane_through_atoms(g.molecule, 1, 2, 3),
            dist_thresh=0.5, axes_limits=[(-5, 5)]*2, color_span=color_span,
            save_to=path + calc[-6:] + '_V.pdf')

        graphs.plot_points(
            diff_field, 2, title=calc + " Errors", molecule=g.molecule,
            plane_eqn=graphs.plane_through_atoms(g.molecule, 1, 2, 3),
            dist_thresh=0.5, axes_limits=[(-5, 5)]*2,
            color_span=error_color_span, save_to=path + calc[-6:] + '_E.pdf')

    save_to = path + "RMS.pdf"
    calc_plot(calcs, rms_list, charge_type.upper() + " RMS value",
              set_lim=True, save_to=save_to)

    for atom in g.molecule:
        save_to = path + atom.identity + str(atom.label) + "_charge.pdf"
Beispiel #2
0
    sys.exit(1)

if filetype == '.cub':
    g = cube_helpers.Cube(args.points_file)
elif filetype == '.esp':
    g = resp_helpers.G09_esp(args.points_file)

# TODO: The colour span is calculated based on all values, but if only a slice
# is plotted, the shown points may occupy only a narrow range.
if args.color_range:
    color_span = args.color_range
elif args.sym_color_range:
    color_limit = max(abs(np.nanmin(g.field.get_values())),
                      abs(np.nanmax(g.field.get_values())))
    color_span = [-color_limit, color_limit]
else:
    color_span = [min(g.field.get_values()), max(g.field.get_values())]

if args.slice_atoms:
    plane_eqn = graphs.plane_through_atoms(g.molecule, *args.slice_atoms)
else:
    plane_eqn = args.slice_eqn

graphs.plot_points(
    g.field, args.dimension, molecule=g.molecule,
    plane_eqn=plane_eqn,
    dist_thresh=args.slice_dist,
    axes_limits=[args.limits]*args.dimension,
    color_span=color_span,
    save_to=args.output)
Beispiel #3
0
            print("\n", min_rms, file=fc)

        # Default given as extremal values of methane CHelpG
        color_span = check_color_span(g.field.values,
                                      color_span,
                                      default=[-0.0045, 0.011])
        diff_field = difference(g.field, rep_esp_field)
        error_color_span = check_color_span(diff_field.values,
                                            error_color_span,
                                            default=[-0.0012, 0.019])

        graphs.plot_points(g.field,
                           2,
                           title=calc,
                           molecule=g.molecule,
                           plane_eqn=graphs.plane_through_atoms(
                               g.molecule, 1, 2, 3),
                           dist_thresh=0.5,
                           axes_limits=[(-5, 5)] * 2,
                           color_span=color_span,
                           save_to=path + calc[-6:] + '_V.pdf')

        graphs.plot_points(diff_field,
                           2,
                           title=calc + " Errors",
                           molecule=g.molecule,
                           plane_eqn=graphs.plane_through_atoms(
                               g.molecule, 1, 2, 3),
                           dist_thresh=0.5,
                           axes_limits=[(-5, 5)] * 2,
                           color_span=error_color_span,
                           save_to=path + calc[-6:] + '_E.pdf')