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

Invalid type annotation on InputMolSpec #27

Open
xperrylinn opened this issue Jun 7, 2023 · 1 comment
Open

Invalid type annotation on InputMolSpec #27

xperrylinn opened this issue Jun 7, 2023 · 1 comment

Comments

@xperrylinn
Copy link
Collaborator

The type annotation on the geometries on the attribute of the InputMoleculeSpec states Optional[List[Geometry]], however the @validator("geometries", pre=True) decorating the convert_xyz_to_geometry method has logic that converts the input
geometries to Geometry objects assuming the input as a list of file paths (geometries = [Geometry(xyz=xyz) for xyz in geometries]).

I encountered this issue running the following code:

InputMoleculeSpec(
    smile="F[P-](F)(F)(F)(F)F",
    count=60,
    name="PF6",
    charge_scaling=1.0,
    geometries=[Geometry(xyz="./data/PF6.xyz")],
    partial_charges=[1.34, -0.39, -0.39, -0.39, -0.39, -0.39, -0.39],
)
@xperrylinn
Copy link
Collaborator Author

Suggestion PR to update type annotation - https://github.com/orionarcher/pymatgen-io-openmm/pull/28/files

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