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

Center for Prism in python is not the centroid as mentioned in the docs. #2989

Open
emoryljenkins opened this issue Mar 7, 2025 · 0 comments

Comments

@emoryljenkins
Copy link

emoryljenkins commented Mar 7, 2025

When generating a Prism geometry, the center parameter appears to just move the origin from which the vertices are referenced with no dependence on the prism shape. For example, when varying the angle in an isosceles trapezoid, the centroid of the trapezoid moves up and down along the line of symmetry. However, the trapezoid does not move in the simulation cell even when center is moved off the origin.

So I believe this is an error in the documentation. I am unsure what the desired behavior for the Prism originally was, but the way center appears to operate is preferable over the behavior specified here.

I took a glance at the scheme docs for Prism and it seems like in order to use the automatic centroiding, there is auto-center that needs to be specified. Perhaps this was missed in the documentation for the python version?

  • center [Vector3] — If center is not specified, then the coordinates of
    the vertices define the bottom of the prism with the top of the prism being
    at the same coordinates shifted by height*axis. If center is specified, then
    center is the coordinates of the
    centroid of all the vertices (top and
    bottom) of the resulting 3d prism so that the coordinates of the vertices are
    shifted accordingly.
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

1 participant