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

Change input format to YAML #84

Open
heikef opened this issue Dec 1, 2017 · 12 comments
Open

Change input format to YAML #84

heikef opened this issue Dec 1, 2017 · 12 comments

Comments

@heikef
Copy link
Contributor

heikef commented Dec 1, 2017

I got some user feedback regarding the input of gimic and would like to open an issue to discuss on how things should be restructured or not.

@bast
Copy link
Member

bast commented Dec 1, 2017

My long term plan is to switch input format to YAML format. I have a related project where we want to develop the next generation input parser and replace libgetkw. All suggestions welcome for features you would like to have implemented there.

@bast
Copy link
Member

bast commented Dec 1, 2017

And I think input and scripts is a too wide topic. I think scrips and input format are two different topics.

@heikef
Copy link
Contributor Author

heikef commented Dec 1, 2017

Why YAML? I found this page: http://yaml.org/ Does not look tempting to me.

Changed the discussion topic for not being too wide. I think this is related to input format plans.

@heikef heikef changed the title Input and scripts discussion Input format discussion Dec 1, 2017
@bast
Copy link
Member

bast commented Dec 1, 2017

That page is scary but YAML is the de-factor standard input format. Easy to parse for machines, easy to write for machines, easy to write for humans, readable for humans. You can have nested sections. My favorite format. But don't worry, before going there I would create a proper proposal demonstrating how the new input would look compared to now. What I can already promise is that it will look a lot cleaner and easier to read.

@bast
Copy link
Member

bast commented Dec 1, 2017

Most importantly: it is a standard format. Creating own formats is not a good idea.

@bast
Copy link
Member

bast commented Dec 1, 2017

Example - instead of:

calc=integral          # cdens, integral, edens, divj
#dryrun=off        # don't actually calculate (good for tuning grids, etc.)
title=""
basis="MOL"
xdens="XDENS"
debug=1           # debug print level
openshell=false
# show_axis=true   # mark "up" axis in .xyz files
magnet_axis=X #[-] i,j,k || x,y,z -> align magnet along axis

# grid type can be: base/std, bond or file (see examples below)
Grid(bond) {                    # define grid orthogonal to a bond
    type=gauss                  # gauss distribution of grid points
    bond=[1,2]
    fixpoint=4
    distance=1.32               # place grid 'distance' between atoms
    gauss_order=9               # order for gauss quadrature
    grid_points=[30, 30, 0]
    height=[-5.0, 5.0]
    width=[-2.2, 5.0]
}

With YAML:

calc: integral          
title: ""
basis: "MOL"
xdens: "XDENS"
debug: 1           
openshell: false
magnet_axis: X 

grid:
  type: gauss                  
  bond: [1, 2]
  fixpoint: 4
  distance: 1.32 
  gauss_order: 9 
  grid_points: [30, 30, 0]
  height: [-5.0, 5.0]
  width: [-2.2, 5.0]

@heikef
Copy link
Contributor Author

heikef commented Dec 1, 2017

I see your point. However, I am happy that this is not on the desk right now. ;)

@bast
Copy link
Member

bast commented Dec 1, 2017

I will work on the input parser independently of GIMIC. Later GIMIC can decide whether it likes it or not.

@heikef
Copy link
Contributor Author

heikef commented Dec 1, 2017

Ok - the example you showed is less scary that the web page. I suggest to take this up into an issue/meeting discussion. Would that be ok?

@bast
Copy link
Member

bast commented Dec 1, 2017

That's fine. There is no rush with this.

@heikef
Copy link
Contributor Author

heikef commented Dec 1, 2017

There is always a rush. I just put in on the agenda for our next project meeting.

@heikef
Copy link
Contributor Author

heikef commented Dec 15, 2017

So we go for YAML. Replace getkw python.

@heikef heikef changed the title Input format discussion Change input format to YAML Dec 15, 2017
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

2 participants