grimme-lab / mctc-lib

Modular computation tool chain library
https://grimme-lab.github.io/mctc-lib
Apache License 2.0
15 stars 17 forks source link

Support chemical JSON #50

Closed awvwgk closed 2 years ago

awvwgk commented 2 years ago

Enable support for reading chemical JSON in xtb, dftd4, etc., chemical JSON is beside CML the only format supported in Avogadro 2 for saving structures.

Specs:

Impl.:

awvwgk commented 2 years ago

@ghutchis Is there a more up-to-date specification of chemical JSON than https://wiki.openchemistry.org/Chemical_JSON?

codecov[bot] commented 2 years ago

Codecov Report

Merging #50 (9c134f3) into main (f02b590) will decrease coverage by 1.01%. The diff coverage is 58.57%.

@@            Coverage Diff             @@
##             main      #50      +/-   ##
==========================================
- Coverage   69.80%   68.78%   -1.02%     
==========================================
  Files          60       64       +4     
  Lines        7616     8403     +787     
  Branches     2232     2503     +271     
==========================================
+ Hits         5316     5780     +464     
- Misses        739      873     +134     
- Partials     1561     1750     +189     
Impacted Files Coverage Δ
test/main.f90 31.03% <ø> (ø)
src/mctc/io/write/cjson.f90 23.97% <23.97%> (ø)
test/test_write_cjson.f90 53.84% <53.84%> (ø)
test/test_write.f90 56.41% <54.54%> (-0.20%) :arrow_down:
test/test_read_cjson.f90 63.14% <63.14%> (ø)
src/mctc/io/read/cjson.F90 66.94% <66.94%> (ø)
test/test_read.f90 93.23% <95.23%> (+0.32%) :arrow_up:
src/mctc/io/filetype.f90 45.65% <100.00%> (+1.20%) :arrow_up:
src/mctc/io/read.f90 51.35% <100.00%> (+1.35%) :arrow_up:
src/mctc/io/write.f90 48.57% <100.00%> (+1.51%) :arrow_up:
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

ghutchis commented 2 years ago

I don't know, for example, if anything "in the wild" only prints the lattice parameters. For a while now, Avogadro writes the lattice vectors, e.g.

KBr.txt

Happy to continue the discussion. I'm building up the interactive optimization and several people (including myself) would like to use xtb methods. Being able to write cjson instead of Turbomole coords would be nice, although I implemented that recently.

On the writer side, there's a lot that can be supported or improved. Happy to continue the conversation - probably better on the chemicaljson repository.

awvwgk commented 2 years ago

I think I got the format implemented now. Avogadro 2 happily reads the cjson files I'm producing.

matterhorn103 commented 10 months ago

@awvwgk Could the support for cjson be mentioned in the docs? :)

awvwgk commented 10 months ago

Please open an issue in the respective repo in the future.

Updating the table in https://github.com/grimme-lab/xtb_docs/pull/115

matterhorn103 commented 9 months ago

Sure, sorry! Still getting used to the structure of open source projects e.g. that docs are typically in a separate repo