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

znh5md convert support *.gro and .xtc #84

Open
PythonFZ opened this issue Nov 6, 2023 · 0 comments
Open

znh5md convert support *.gro and .xtc #84

PythonFZ opened this issue Nov 6, 2023 · 0 comments

Comments

@PythonFZ
Copy link
Member

PythonFZ commented Nov 6, 2023

ref = ase.io.read("nvt_eq.gro")

reader = znh5md.io.ChemfilesReader("nvt_eq.xtc")
db = znh5md.io.DataWriter("nvt_eq.h5")
db.initialize_database_groups()
db.add(reader)

x = znh5md.ASEH5MD("nvt_eq.h5")
for atoms in x.get_atoms_list():
    atoms.set_atomic_numbers(ref.get_atomic_numbers())
ase.io.write("nvt_eq.xyz", atoms_list)
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