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.48k stars 850 forks source link

Elastic and NMR OUTCAR needs to be refactored #350

Closed shyuep closed 8 years ago

shyuep commented 8 years ago

System

Thanks.

xhqu1981 commented 8 years ago

Will do. Thanks.

shyuep commented 8 years ago

@montoyjh @xhqu1981 Can I have a status update pls.

xhqu1981 commented 8 years ago

I will push the solution tonight or tomorrow.

On Sat, May 7, 2016 at 7:29 AM, Shyue Ping Ong notifications@github.com wrote:

@montoyjh https://github.com/montoyjh @xhqu1981 https://github.com/xhqu1981 Can I have a status update pls.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/materialsproject/pymatgen/issues/350#issuecomment-217641196

xhqu1981 commented 8 years ago

Done. @shyuep I have to add the read_table_pattern() method. This is because the NMR data are tables and context related. Very hard to defined by a single line pattern. E.g. the chemical shift table have two sections one is without core contribution, another is with core contributions. Only the second one is desired. The rows from both section are matching exactly the same line pattern. As such, I have to add one more function read_table_pattern(). Both chemical shift and EFG parsing are built on it. Concept of of named and unamed regex capturing groups is involved. It increases some complexity, however, it helps users to get the desired field only.

montoyjh commented 8 years ago

The read_table_pattern is a lot more flexible than my initial approach to the elastic/piezo, so I'm going to redo my changes using that method.

xhqu1981 commented 8 years ago

@montoyjh Thanks.

shyuep commented 8 years ago

Thanks,