Add atomSize keyword to the ppafm-plot-results.py #390
Open
huangchieh wants to merge 6 commits into
Open
Conversation
There was a problem hiding this comment.
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
--atomSizeCLI argument (default0.15) and wire it into all plotting calls. - Extend the
PTCDA_singleexample to show plotting with atoms overlaid and the new flag. - Add
examples/PTCDA_single/input_plot.xyzfor 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.
| 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"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To solve issue #389
atomSizekeyword to ppafm-plot-results.py.PTCDA_single, add some lines to demonstrate the usage.input_plot.xyzis added, which is the same asPTCDA.xyz.Default

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