iRASPA Community

RASPA => Input files and parameters => Topic started by: neumannrf on August 09, 2021, 06:26:24 PM

Title: ExternalTemperature does not work like ExternalPressure
Post by: neumannrf on August 09, 2021, 06:26:24 PM
Hello everyone!

I noticed that although one can provide a list of reals as input to ExternalPressure, effectively simulating a full isotherm curve in a single run, the same is not true when it comes to ExternalTemperature.

Despite of what the RASPA manual says
the temperature parsing code does not have the while loop to read the list of real numbers representing the temperature. See here: https://github.com/iRASPA/RASPA2/blob/master/src/input.c#L2171-L2193.

Do you know of an alternative way to run a full isobar curve in a single run?
Title: Re: ExternalTemperature does not work like ExternalPressure
Post by: David Dubbeldam on August 11, 2021, 09:00:28 AM
You are correct (and the manual has an error). You can put a list of pressures in the input, but only one temperature.
In practice, using a list of pressures is a bad idea, unless you really want to compute adsorption+desorption and examine hysteresis. The downside is that all simulations have to be run sequentially.

In practice, people develop scripts to submit batch-scripts to submit large number of jobs (for example: for various MOFs, various temperatures, various molecules, compute the isotherm over a pressure range).

An an inspiration, see the example scrips in the 'scripts' directory of the RASPA source.
You fill in the top-part, run the script and it will generate the input-files. A second script will read the data out of the output-files and put in a more useful format that can be used for plotting.
Title: Re: ExternalTemperature does not work like ExternalPressure
Post by: neumannrf on August 18, 2021, 02:25:44 PM
Hi David! I am curious about why you consider providing a list of pressures to be a bad idea. Is that only because the simulations run sequentially rather than in parallel (as different jobs)?

I find it a great feature and I use it to run a full isotherm curve in a single execution. As I understand it from the output, it seems that each new pressure point already starts with the last loading of the previous pressure point. This helps a lot to speed up equilibration, specially at the highest pressures in the curve, as I am not starting from 0 molecules each time.

Were I to submit N independent simulations for N different pressure points, wouldn't I get the same result as running a single simulation with N pressure values? That, of course, provided I choose a long enough number of MC cycles.
Title: Re: ExternalTemperature does not work like ExternalPressure
Post by: David Dubbeldam on August 31, 2021, 08:35:10 PM
Like you say, if simulation-time was not an issue, then starting from a previous point helps with equilibration. But the computational cost is large, especially for higher pressures. So by submitting them all in parallel, you can compute the full isotherm at the costs of the time of the largest loading. For sequential running, you will need to wait for the result of the previous pressure. So, especially for isotherm with say 10-20 points, running them in parallel really helps.