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

Position matrix size does not need to match number of atoms (it can be greater) #528

Open
andrewtarzia opened this issue Apr 30, 2024 · 4 comments

Comments

@andrewtarzia
Copy link
Collaborator

Not super important, but worth noting that the position matrix size can be >= number of atoms without throwing an exception.

@lukasturcani
Copy link
Owner

wait.. explain?

@andrewtarzia
Copy link
Collaborator Author

If you use stk.BuildingBlock.init(atoms=...,bonds=...,position_matrix=...) you only get can exception if len(position_matrix) < len(atoms) (this is correct). But if there are more positions than atoms, stk just uses the positions needed for the desired atoms and does not throw an exception. This could lead to weird behaviour?

@andrewtarzia
Copy link
Collaborator Author

This is more about making stk safer, while the issue is actually just user error

@lukasturcani
Copy link
Owner

ah damn -- good spot!

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

No branches or pull requests

2 participants