materialsproject / pymatgen

Python Materials Genomics (pymatgen) is a robust materials analysis code that defines classes for structures and molecules with support for many electronic structure codes. It powers the Materials Project.
https://pymatgen.org
Other
1.52k stars 868 forks source link

Improvements needed for io.lammps.data #865

Closed adengz closed 7 years ago

adengz commented 7 years ago

A few issues with the current implementation I would like to discuss with whoever involved in this module.

shyuep commented 7 years ago

Go ahead and make the changes.

adengz commented 7 years ago

After struggling for weeks, here I will list a few upcoming major changes to the entire io.lammps package. Yes it will certainly break some code, but I don't see many API usage depending on methods or attributes of LammpsData or LammpsForceFieldData.

  1. LammpsData and LammpsForceFieldData will be merged into one class LammpsData, where force field and topology sections are optional. write_file and from_file will be the only methods of LammpsData, and it will have no dependency on any subclass of SiteCollection. As LAMMPS data file may carry a lot more information than other geometry input files (like POSCAR), it might not be suitable for LammpsData to take in or export any types of molecule or structure directly.
  2. Though LammpsData will become kinda independent, there would be supporting classes/methods to help generate all kinds of data. For instance, getting Atoms section data from any SiteCollection, labeling atoms or topologies from ForceField, and automatically determining bonding topologies. These would be in module io.lammps.data or a separate module, say io.lammps.data_utils. ForceField and Topology are now in separate modules, though both of them only serve LammpsForceFieldData.

I would like to hear some feedbacks from users of this package, especially @matk86

shyuep commented 7 years ago

Just go ahead and make the changes.