You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use python to load the chemfiles/tests-data, for example lammps-data/solvated.lmp. But it raises an error that ChemfilesError: can not find a format associated with the '.lmp' extension. In the supported formats page, the extension of lammps data is false. Could you please tell me how to load lammps data? I want to extract topology info.
The text was updated successfully, but these errors were encountered:
Since there is no standard for extension for LAMMPS data files, you'll need to specify the format explicitly when opening the file:
fromchemfilesimportTrajectorytrajectory=Trajectory("lammps-data/solvated.lmp", "r", format="LAMMPS Data")
frame=trajectory.read()
# depending on what's inside the data file, you might want to guess the bonds using a distance-based algorithm# frame.guess_bonds()topology=frame.topology
(you can always specify a format, and it will override the guess based on file extension, for example Trajectory("solvated.mol", "r", format="XYZ") will try to read the file as an XYZ file)
I use python to load the chemfiles/tests-data, for example lammps-data/solvated.lmp. But it raises an error that ChemfilesError: can not find a format associated with the '.lmp' extension. In the supported formats page, the extension of lammps data is false. Could you please tell me how to load lammps data? I want to extract topology info.
The text was updated successfully, but these errors were encountered: