-
Notifications
You must be signed in to change notification settings - Fork 15
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
Upgrade the aimsgb structure factory #1123
Draft
usaikia
wants to merge
2
commits into
main
Choose a base branch
from
aimsgb_upgrade
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the structure toolkit interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interface is pretty similar and this is what is used by
pyiron_atomistics
in the background https://github.com/pyiron/structuretoolkit/blob/main/structuretoolkit/build/aimsgb.pyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened a jupyter notebook from the jupyterhub session runnig at cmti and tried to import
from structuretoolkit.common.pymatgen import ase_to_pymatgen, pymatgen_to_ase
and got this errorModuleNotFoundError: No module named 'structuretoolkit.common'
from structuretoolkit.build import grainboundary, get_grainboundary_info
also gave me the errorImportError: cannot import name 'grainboundary' from 'structuretoolkit.build' (/u/system/SLES12/soft/pyiron/dev/anaconda3/lib/python3.10/site-packages/structuretoolkit/build/__init__.py)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I got this. I have to modify the import statement from
from structuretoolkit.build import grainboundary, get_grainboundary_info
tofrom structuretoolkit.build.aimsgb import grainboundary_info, grainboundary_build
But, still can't figure out what is the new alternative of
structuretoolkit.common.pymatgen import ase_to_pymatgen, pymatgen_to_ase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I am confused, because it is available in the official package https://github.com/pyiron/structuretoolkit/blob/main/structuretoolkit/common/pymatgen.py . Which version of structure toolkit is installed on cmti? You can check the version using
conda list structuretoolkit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output of
conda list structuretoolkit
is as follows:packages in environment at /u/system/SLES12/soft/pyiron/dev/anaconda3:
Name Version Build Channel
structuretoolkit 0.0.1 pyhd8ed1ab_1 conda-forge
Note: you may need to restart the kernel to use updated packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this is a rather old version - the current version is
0.0.7
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jan-janssen Thanks! I noticed that the current incompatibility issue is coming from this line
AseAtomsAdaptor.get_structure(initial_struct, cls=None)
. The optioncls=None
is no longer accepted. We can change it toAseAtomsAdaptor.get_structure(initial_struct)
which will take the default value which ispymatgen.Structure