Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic orbital wise analysis functionality in analyze module #132

Merged
merged 63 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
2cca572
added orbital wise analysis functionality in analyze module
naik-aakash Aug 2, 2023
855f4aa
add missing docstring
naik-aakash Aug 2, 2023
cf5fedf
update analyze orbital wise analysis data
naik-aakash Aug 3, 2023
dc68d7f
removed redundant code block, use new method of analyze module to ret…
naik-aakash Aug 3, 2023
04ff0e5
fix orbitalwise analysis bug
naik-aakash Aug 11, 2023
4a86355
Merge branch 'JaGeo:main' into orbital_resolved_analysis
naik-aakash Aug 14, 2023
52d62c2
cleanup code
naik-aakash Aug 14, 2023
41d0534
update Plaincohpplotter> orbital resolved plots
naik-aakash Aug 14, 2023
dab0fa1
more cleanup and update describe and plotting
naik-aakash Aug 16, 2023
6682a5c
add missing doc string
naik-aakash Aug 16, 2023
faaced6
fix pylint
naik-aakash Aug 16, 2023
4969976
clean up interactive plotter and improve plot legends
naik-aakash Aug 18, 2023
ed7f672
update describe module text to show relevant orbital info
naik-aakash Aug 18, 2023
7e358cb
update test workflow to show missing lines
naik-aakash Aug 18, 2023
a3e5591
fix describe module bug
naik-aakash Aug 18, 2023
4f21094
fix describe module
naik-aakash Aug 18, 2023
03762a4
update describe text, add tests and test data
naik-aakash Aug 18, 2023
61122f1
fix erroneous hardcarded cutoff limit for orb resolved analysis
naik-aakash Aug 25, 2023
daf2939
add missing blank space in text description
naik-aakash Aug 25, 2023
9f1953a
Merge branch 'main' into orbital_resolved_analysis
naik-aakash Sep 7, 2023
adca9a5
fix linitng
naik-aakash Sep 7, 2023
cf5451c
Merge branch 'JaGeo:main' into orbital_resolved_analysis
naik-aakash Sep 13, 2023
08fa927
Merge branch 'main' into orbital_resolved_analysis
naik-aakash Sep 14, 2023
eef6adb
fix linting errors
naik-aakash Sep 14, 2023
9c3ed71
add missing seperator
naik-aakash Sep 14, 2023
cd3c1c0
run black
naik-aakash Sep 14, 2023
851c4b3
adapt orbitalwise analysis to coop and cobi
naik-aakash Sep 15, 2023
b993d9b
mypy fixes
naik-aakash Sep 15, 2023
fd3f6d2
Merge branch 'JaGeo:main' into orbital_resolved_analysis
naik-aakash Sep 15, 2023
44be164
fix bonding antibonding percentage bug for cobi/coop orbitalwise anal…
naik-aakash Sep 15, 2023
c278e30
add orbital interaction cutoff arg, intuitive interactive plotter leg…
naik-aakash Sep 16, 2023
72422d5
fix pydocstyle error
naik-aakash Sep 16, 2023
8edd14f
Merge branch 'JaGeo:main' into orbital_resolved_analysis
naik-aakash Sep 16, 2023
a3ee806
fix test cases, fix label resolved bug in plotting module
naik-aakash Sep 18, 2023
9041e90
more robust tests for interactive plotters, cli integration for orbit…
naik-aakash Sep 18, 2023
dcf0c86
fix missing articles in the text descriptions
naik-aakash Sep 18, 2023
8b6339d
update test durations and change no. of splits to 6
naik-aakash Sep 18, 2023
53dabc3
update test durations
naik-aakash Sep 18, 2023
8e62aa6
fix workflow
naik-aakash Sep 18, 2023
86978bb
Merge branch 'JaGeo:main' into orbital_resolved_analysis
naik-aakash Sep 19, 2023
b75f921
fix description text bond label, descriptive variable names, incorpor…
naik-aakash Sep 19, 2023
cb723f4
fix linting, add missing type hints
naik-aakash Sep 19, 2023
cd8a515
remove redundant print statement
naik-aakash Sep 19, 2023
6fdec7b
update orbital wise analysis text description and condensed bonding s…
naik-aakash Sep 20, 2023
a8b45c2
rename outer_key to drop_down_key
naik-aakash Sep 21, 2023
ea72848
refactor codes to remove code repetition and update test data, rename…
naik-aakash Sep 21, 2023
af56d97
fix mypy errors
naik-aakash Sep 21, 2023
7c4eebe
fix interactive plotting bug
naik-aakash Oct 3, 2023
f470b41
improve orbitalwise implementation for max anti bonding contri
naik-aakash Oct 3, 2023
b1560ea
update tests and test files
naik-aakash Oct 3, 2023
2354af5
change orb resolved analysis to use summed cohps
naik-aakash Oct 6, 2023
e4060f7
run black
naik-aakash Oct 6, 2023
b2c3e87
Merge branch 'main' into orbital_resolved_analysis
naik-aakash Oct 6, 2023
fa79a9c
fix keyword for new tests
naik-aakash Oct 6, 2023
2aef248
implemented robust orbital wise analysis
naik-aakash Oct 8, 2023
c293cce
make text description clearer for orbitwalwise case
naik-aakash Oct 8, 2023
41c6088
update tests and test files
naik-aakash Oct 8, 2023
050d730
Merge branch 'JaGeo:main' into orbital_resolved_analysis
naik-aakash Oct 10, 2023
100a39a
add missing space in text description and update corresponding test
naik-aakash Oct 10, 2023
f9f3f3b
fix flake8 linting error
naik-aakash Oct 10, 2023
c0b6625
use numpy testing for array equality
naik-aakash Oct 11, 2023
018aaed
add more comments, fix typo : address comments
naik-aakash Oct 13, 2023
cfded26
Merge branch 'JaGeo:main' into orbital_resolved_analysis
naik-aakash Oct 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
split: [1, 2, 3, 4, 5] # Number of splits
split: [1, 2, 3, 4, 5, 6] # Number of splits

steps:
- uses: actions/checkout@v3
Expand All @@ -41,7 +41,7 @@ jobs:
# run this locally to update tests durations
# pytest --cov=lobsterpy --cov-append --splits 1 --group 1 --durations-path ./lobsterpy/TestData/.pytest-split-durations --store-durations
run: |
pytest --cov=lobsterpy --cov-report term-missing --cov-append --splits 5 --group ${{ matrix.split }} --durations-path ./lobsterpy/TestData/.pytest-split-durations
pytest --cov=lobsterpy --cov-report term-missing --cov-append --splits 6 --group ${{ matrix.split }} --durations-path ./lobsterpy/TestData/.pytest-split-durations
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
Expand Down
230 changes: 118 additions & 112 deletions lobsterpy/TestData/.pytest-split-durations

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

28 changes: 27 additions & 1 deletion lobsterpy/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,22 @@ def get_parser() -> argparse.ArgumentParser:
help="Only bonds that are stronger than cutoff_icoxx *strongest ICOHP "
" (ICOBI or ICOOP) will be considered for automatic analysis.",
)

auto_group.add_argument(
"--orbitalresolved",
"--orbital-resolved",
action="store_true",
default=False,
help="Will switch on orbital resolved analysis of (I)COHPs or (I)COBIs or (I)COOPs with all relevant orbitals.",
)
auto_group.add_argument(
"--orbitalcutoff",
"--orbital-cutoff",
type=float,
default=0.05,
help="Will only work when orbital wise analysis is switched on (--orbitalresolved) "
"and only orbital interactions that are stronger than orbitalintcutoff * 100 of relevant "
"bonds (ICOHP or ICOBI or ICOOP) will be considered in automatic analysis.",
)
analysis_switch = argparse.ArgumentParser(add_help=False)
analysis_group = analysis_switch.add_argument_group(
"Switch type of analysis or plots"
Expand Down Expand Up @@ -367,6 +382,14 @@ def get_parser() -> argparse.ArgumentParser:
"If not set, plots will consists of summed cohps. (This argument works only"
"for interactive plots) ",
)
interactive_plotter_group.add_argument(
"--orbitalplot",
"--orbital-plot",
action="store_true",
help="Will generate automatic interactive (I)COHP or (I)COBI or (I)COOP plots with all relevant orbitals "
"If used along with --labelresolved arg, plots will be further label resolved else,"
"plots will consists of summed orbital cohps. ",
)

auto_group.add_argument(
"--calcqualityjson",
Expand Down Expand Up @@ -680,6 +703,8 @@ def run(args):
are_cobis=args.cobis,
noise_cutoff=args.noisecutoff,
cutoff_icohp=args.cutofficohp,
orbital_cutoff=args.orbitalcutoff,
orbital_resolved=args.orbitalresolved,
)

describe = Description(analysis_object=analyse)
Expand Down Expand Up @@ -747,6 +772,7 @@ def run(args):
sigma=sigma,
hide=args.hideplot,
label_resolved=args.labelresolved,
orbital_resolved=args.orbitalplot,
)

if args.action == "plot":
Expand Down
516 changes: 503 additions & 13 deletions lobsterpy/cohp/analyze.py

Large diffs are not rendered by default.

Loading