Comments (1)
Contents of an email sent to David Dubbeldam copied below.
David,
There’s a json-c library that’s MIT licensed, so that could be lifted easily enough
I’m a fan of JSON due to its ubiquitousness, but, if you’re concerned about hits to human readability, there are other formats that could be considered.
I’m going to write out a few and see what they look like. Here’s a sample json:
{
"simulation type": "monte carlo",
"number of cycles": 100000,
"number of initialization cycles": 10000,
"print every": 1000,
"boxes": [
{
"box lengths": [30, 30, 30],
"external temperature": 300,
}
],
"components": {
"methane": {
"translation probability": 1.0,
"create number of molecules": 100
}
}
}
Here’s a sample pyconfig:
simulation_type = "monte carlo"
number_of_cycles = 100000
number_of_initialization_cycles = 100000
print_every = 1000
boxes = {"box lengths": [30, 30, 30], "external temperature": 300}
components = {"methane": {"translation probability": 1.0, "create number of molecules": 100}}
Here’s a sample yaml:
simulation_type: MonteCarlo
number_of_cycles: 100000
number_of_initialization_cycles: 100000
print_every: 1000
boxes:
- box_lengths: [30, 30, 30]
external_temperature: 300
components:
- methane
- translation probability: 1.0
create number of molecules: 100
They are all computer readable and come with elegant error handling. JSON does seem messy for a config. Python is easy to parse and allows people to write runnable code in their configs, which is neat. YAML looks the most like the current format, but would require third-party libraries for data handling. Thoughts?
Anyway, I’d be willing to edit up a RASPA fork with some of these ideas. I’d maintain the current API and have this option in addition. If people like it, we could switch to it in a v3 release.
Pat
from raspa2.
Related Issues (20)
- GCMC problem: Extraordinarily high N2 capacity in ZIF8
- Could RASPA 2.0 utilizes GPU?
- Position x.y.z
- Results verification
- Net Charge not zero
- RASPA2 & IPython Notebook HOT 4
- FEYNMAN HIBBS LENNARD JONES HOT 1
- how run RASPA2 HOT 2
- how to check fftw3, blas, lapack installed with raspa2 HOT 8
- RASPA2 Compilation with MPI HOT 5
- CO.def HOT 1
- how to import the materials to RASPA2
- how to import Materials to RASPA2 HOT 4
- how to run example given in git?
- iRASPA forum: for RASPA community
- how to calculate isosteric adsorption heat with RASPA?
- How to set the chemical potential in RASPA2?
- How to get a accurate Forcefield of a flexible MOFs?
- how to write a cif file readable by RASPA
- Predicting adsorption behavior using GCMC Simulation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raspa2.