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

Add pyxtal wrapper #1093

Merged
merged 20 commits into from
Feb 14, 2024
Merged

Add pyxtal wrapper #1093

merged 20 commits into from
Feb 14, 2024

Conversation

pmrv
Copy link
Contributor

@pmrv pmrv commented Jun 28, 2023

PyXtal is a similar structure generation tool as RandSPG, but (imo) more convenient and comprehensive. I've made it a mandatory dependency, because I saw no reason not to, but I can wrap it in ImportAlarms as well.

@pmrv pmrv added enhancement New feature or request dependencies Pull requests that update a dependency file labels Jun 28, 2023
@pmrv pmrv marked this pull request as draft June 28, 2023 14:55
@pmrv
Copy link
Contributor Author

pmrv commented Jun 28, 2023

It seems I have to make it optional as mamba for some reason refuses to install another dependency for python compat reasons, even though that dependency (pyshtools) is available for up to python 3.8.

@jan-janssen jan-janssen added the format_black reformat the code using the black standard label Jun 29, 2023
@jan-janssen
Copy link
Member

Is it possible to add pyxtal to https://github.com/pyiron/structuretoolkit ?

@jan-janssen
Copy link
Member

The issue is that pyxtal requires pyshtools ==4.10 which does not support Apple ARM and Python 3.11 while pyshtools ==4.10.3 does. I raised an issue up stream to see if it is possible to add support for pyshtools ==4.10.3 : MaterSim/PyXtal#222

@pmrv
Copy link
Contributor Author

pmrv commented Jun 29, 2023

Is it possible to add pyxtal to https://github.com/pyiron/structuretoolkit ?

Sure, I hadn't seen we had also moved the constructors over there.

@jan-janssen
Copy link
Member

Sure, I hadn't seen we had also moved the constructors over there.

As long as everything is ASE compatible, then it can go to structuretoolkit. The idea is that people who are already familiar with ASE can use the structuretoolkit without being forced to switch to pyiron completely. Once they like structuretoolkit then they might also be motivated to try pyiron.

setup.py Outdated Show resolved Hide resolved
@jan-janssen
Copy link
Member

======================================================================
ERROR: test_return_value (atomistics.structure.test_pyxtal.TestPyxtal)
pyxtal should either return Atoms or StructureStorage, depending on arguments
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/pyiron_atomistics/pyiron_atomistics/tests/atomistics/structure/test_pyxtal.py", line 32, in test_return_value
    self.assertIsInstance(pyxtal(1, species=['Fe'], num_ions=[1], repeat=5),
  File "/usr/share/miniconda3/envs/my-env/lib/python3.9/unittest/case.py", line 1258, in assertIsInstance
    if not isinstance(obj, cls):
TypeError: isinstance() arg 2 must be a type or tuple of types

----------------------------------------------------------------------

@coveralls
Copy link

coveralls commented Jul 8, 2023

Pull Request Test Coverage Report for Build 7903300471

Details

  • 0 of 50 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 93.172%

Totals Coverage Status
Change from base Build 7898937283: 0.02%
Covered Lines: 14205
Relevant Lines: 15246

💛 - Coveralls

@jan-janssen
Copy link
Member

@pmrv With the new release of pyxtal all the tests finally pass, so I think we can move ahead with the integration in pyiron_atomistics or preferable structuretoolkit.

@pmrv
Copy link
Contributor Author

pmrv commented Jul 8, 2023

Great, thanks for fixing the tests as well. I'll move the core functionality over to structuretoolkit next week then.

@pmrv
Copy link
Contributor Author

pmrv commented Jul 19, 2023

Depends on pyiron/structuretoolkit#24

@jan-janssen jan-janssen added format_black reformat the code using the black standard and removed format_black reformat the code using the black standard labels Aug 2, 2023
pyiron-runner and others added 2 commits August 2, 2023 13:30
since it is an optional dep for structuretoolkit
@pmrv pmrv marked this pull request as ready for review August 2, 2023 15:05
@@ -22,3 +22,4 @@ dependencies:
- seekpath =2.1.0
- spglib =2.0.2
- structuretoolkit =0.0.6
- pyxtal =0.5.9
Copy link
Member

Choose a reason for hiding this comment

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

I am a bit reluctant to make pyxtal a required dependency as long as the environment doubles - as discussed in pyiron/structuretoolkit#46 .

Copy link
Member

Choose a reason for hiding this comment

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

This is also the reason why the upgrade from structuretoolkit is currently delayed #1124

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, this can wait until a new version of pyxtal is released.

@jan-janssen
Copy link
Member

structuretoolkit 0.0.9 contains pyxtal 0.6.0

@stale
Copy link

stale bot commented Oct 15, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 15, 2023
@stale stale bot removed the stale label Feb 14, 2024
@jan-janssen jan-janssen merged commit 35c9270 into main Feb 14, 2024
24 of 25 checks passed
@jan-janssen jan-janssen deleted the pyxtal branch February 14, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request format_black reformat the code using the black standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants