softmaterialslab / nanoconfinement-md

This code allows users to simulate ions confined between material surfaces that are nanometers apart, and extract the associated ionic structure.
Apache License 2.0
5 stars 13 forks source link

Add config file to pass input values #33

Closed smarru closed 6 years ago

smarru commented 6 years ago

Rappture requires the input values be either sent through a config file or by stdin. Currently, the program only takes inputs as arguments.

Enhance the input module to add in a config file option. Boost allows retaining both the command line while adding a config file as described in this tutorial - http://www.boost.org/doc/libs/1_63_0/doc/html/program_options/tutorial.html#idp523416032

smarru commented 6 years ago

@kadupitiya if you haven't started on this, I found a way to work around this.

kadupitiya commented 6 years ago

@smarru I have done it. Just testing it now. What should I do?

jadhao commented 6 years ago

We have resolved this. The config file is in. And things are consistent with command line or input script

smarru commented 6 years ago

@kadupitiya when I run the application now it complains "can not open config file: input_config.cfg" Can you please make it so that the program can run with command line options without the cfg file? The file should be optional.

kadupitiya commented 6 years ago

@smarru Ok, I will have to comment one return statement. Currently file should be there. Give me 5 mins.

kadupitiya commented 6 years ago

PS: I meant config file should be there in the place where executable is.

jadhao commented 6 years ago

I approved @kadupitiya fix and merged. @smarru Please check if things are fine now and this issue can be closed

smarru commented 6 years ago

thanks you for the quick fix, yes its good now