Skip to content

Add atomSize keyword to the ppafm-plot-results.py #390

Open
huangchieh wants to merge 6 commits into
Probe-Particle:mainfrom
huangchieh:addSize
Open

Add atomSize keyword to the ppafm-plot-results.py #390
huangchieh wants to merge 6 commits into
Probe-Particle:mainfrom
huangchieh:addSize

Conversation

@huangchieh
Copy link
Copy Markdown
Contributor

@huangchieh huangchieh commented May 12, 2026

To solve issue #389

  • Add atomSize keyword to ppafm-plot-results.py.
  • In the example of PTCDA_single, add some lines to demonstrate the usage.
  • To demonstrate this, input_plot.xyz is added, which is the same as PTCDA.xyz.

Default atomSize=0.15, as it was in ppafm-plot-results.py:
ppafm-plot-results -k 0.5 -q -0.10 --arange 0.5 2.0 2 --df --atoms --atomSize 0.15
df_atoms_000

ppafm-plot-results -k 0.5 -q -0.10 --arange 0.5 2.0 2 --df --atoms --atomSize 0.5
df_atoms_000

Copilot AI review requested due to automatic review settings May 12, 2026 18:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a configurable atom overlay size to the ppafm-plot-results CLI, enabling users to tune how large atoms are rendered when --atoms/--bonds overlays are enabled (addressing issue #389).

Changes:

  • Add a new --atomSize CLI argument (default 0.15) and wire it into all plotting calls.
  • Extend the PTCDA_single example to show plotting with atoms overlaid and the new flag.
  • Add examples/PTCDA_single/input_plot.xyz for atom overlay demonstrations.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
ppafm/cli/plot_results.py Adds --atomSize CLI option and passes it through to plotting routines.
examples/PTCDA_single/run.sh Adds an example plotting step using --atoms and --atomSize.
examples/PTCDA_single/input_plot.xyz Provides an atom geometry file used for overlay plotting demonstrations.
examples/PTCDA_single/example_ptcda.py Adds a second plot_results call demonstrating --atoms and --atomSize.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ppafm/cli/plot_results.py
parser.add_argument( "--Fz", action="store_true", help="Plot images for z-component of the (short-range) force acting on the tip in eV/Angstrom")
parser.add_argument( "--pos", action="store_true", help="Save probe particle positions" )
parser.add_argument( "--atoms", action="store_true", help="Plot atoms to images")
parser.add_argument( "--atomSize", action="store", type=float, default=0.15, help="Size of atoms in images")
Comment on lines 11 to +14
ppafm-plot-results -k 0.5 -q -0.10 --arange 0.5 2.0 2 --df

# ======= STEP 4 : Plot the results with atoms overlayed
ppafm-plot-results -k 0.5 -q -0.10 --arange 0.5 2.0 2 --df --atoms --atomSize 0.15
Comment on lines 18 to +20
relaxed_scan(["--klat", "0.5", "--charge", "-0.10"])
plot_results(["--klat", "0.5", "--charge", "-0.10", "--arange", "0.5", "2.0", "2", "--df"])
plot_results(["--klat", "0.5", "--charge", "-0.10", "--arange", "0.5", "2.0", "2", "--df", "--atoms", "--atomSize", "0.15"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants