Skip to content

Conversation

@bradakta
Copy link
Contributor

@bradakta bradakta commented Jun 8, 2023

I hope there is agreement as to how something like this could be useful. I included a test to show how you can place atoms based on internal coordinates using a Z-matrix-like entry.

I hope there is agreement as to how something like this could be useful.
I included a test to show how you can place atoms based on internal
coordinates using a Z-matrix-like entry.
u /= sqrt(np.dot(u, u))
return u

# Skipping type annotations for Atom bc it causes a circular import
Copy link
Contributor

Choose a reason for hiding this comment

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

At the bottom of the file you can do this:

if TYPE_CHECKING:  # must be imported from typing
    from .topologyobjects import Atom

Then you can use strings as type hints:

def local_axes(atom1: "Atom", atom2: "Atom", atom3: "Atom") -> np.ndarray:

@swails
Copy link
Contributor

swails commented Jun 9, 2023

There are a number of places where it'd be useful to do Zmat to cartesian transformations (e.g., CHARMM RTF files).

I'm good adding this.

@swails swails merged commit 6e7332a into ParmEd:master Jun 9, 2023
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

Successfully merging this pull request may close these issues.

2 participants