plumed2 icon indicating copy to clipboard operation
plumed2 copied to clipboard

PRINT grid files may benefit from a FLAG to ensure one is printing a grid

Open carlocamilloni opened this issue 6 years ago • 1 comments

@gtribello what do you think?

(I attach your conversation in the mailing list)

Hello,

Thank you very much for your answer.

I think I might have found a tiny bug in the parser. I get a .grid file if I do this:

PRINT FILE=fes.grid

But if I do:

PRINT FILE=./myfolder/fes.grid or PRINT FILE=./fes.grid

I don't get a grid file, I get what I described above. I don't know if its worth fixing but it is worth knowing at least.

Best Sergio

On Monday, May 6, 2019 at 7:47:49 PM UTC+2, Gareth Tribello wrote: Hello

You need to make sure you have a .grid at the end of the file name that you are printing to.

Gareth

On 4 May 2019, at 14:56, Sergio Perez-Conesa [email protected] wrote:

Hello,

I tried using a script similar to the one I used some time ago and I am getting some problems in the printing. It does not print it out in a grid format but rather something like:

#! FIELDS time tds.1.1 tds.2.1 tds.3.1 tds.4.1 tds.5.1 tds.6.1 tds.7.1 ...

I tried using DUMPGRID but it doesn't seem to use this keyword anymore.

Thank you!

Sergio On Friday, July 13, 2018 at 12:32:12 PM UTC+2, Sergio Perez-Conesa wrote: By the way if anyone else is interested in using it. You can also do 2D grids using ARG1=X ARG2=Y and GRID=300,300 etc. It would be nice if these ACTIONS would make it to the main branch.

On Monday, July 9, 2018 at 3:12:39 PM UTC+2, Sergio Perez-Conesa wrote: The final script is:

#READ Variable ee: READ FILE=COLVAR IGNORE_TIME VALUES=ener s2: READ FILE=COLVAR IGNORE_TIME VALUES=s2

#If it is a METAD simulation: metad: READ FILE=COLVAR IGNORE_TIME VALUES=metad.rbias www: REWEIGHT_BIAS ARG=metad.rbias TEMP=300

Build the numerator of our weighted average. If the simulation is unbiased remove LOGWEIGHTS

enumer_kde: KDE ARG1=s2 HEIGHTS=ee GRID_MIN=-8. GRID_MAX=0. GRID_BIN=100 KERNEL=DISCRETE UNORMALIZED UPDATE_FROM=400000 enumer: AVERAGE ARG=enumer_kde STRIDE=1 LOGWEIGHTS=www

And the denominator. If the simulation is unbiased remove LOGWEIGHTS

edenom_kde: KDE ARG1=s2 GRID_MIN=-8. GRID_MAX=0. GRID_BIN=100 KERNEL=DISCRETE UNORMALIZED UPDATE_FROM=400000 edenom: AVERAGE ARG=edenom_kde LOGWEIGHTS=www

And the average energy on the grid

av_eng: MATHEVAL ARG1=enumer ARG2=edenom FUNC=x/y PERIODIC=NO

Free energy

free_e: CONVERT_TO_FES ARG=edenom TEMP=300.

And the T\Delta S

tds: MATHEVAL ARG1=free_e ARG2=av_eng FUNC=x-y PERIODIC=NO

Print average energy

PRINT ARG=av_eng FILE=average_energy.grid

Print free energy

PRINT ARG=free_e FILE=fes.grid

Print entropy

PRINT ARG=tds FILE=tds.grid

Gaussian Kernels can be used removing KERNEL=DISCRETE and add a BANDWIDTH=0.1.

Thank you! Sergio

On Tuesday, July 3, 2018 at 1:32:51 PM UTC+2, Gareth Tribello wrote: Ok can you send me some input off list so I can take a look please? I am about to take off on a flight currently so I won't be able to respond immediately.

Sorry about that. Gareth

On Tue, 3 Jul 2018, 12:28 Sergio Perez-Conesa, [email protected] wrote: Yes that is the case. They are both equal. It seems to be doing a regular histogram ignoring HEIGHTS.

-- You received this message because you are subscribed to the Google Groups "PLUMED users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/plumed-users. To view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/1819c2f1-4042-47f6-97eb-76fc74dea0d2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

-- You received this message because you are subscribed to the Google Groups "PLUMED users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/plumed-users. To view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/c3ac3ce3-106c-4836-9b17-fd35f26b885f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

-- You received this message because you are subscribed to the Google Groups "PLUMED users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/plumed-users. To view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/c9ffbd71-7cb3-4629-b102-f5e93daeb018%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

carlocamilloni avatar May 10 '19 07:05 carlocamilloni

@gtribello in general I think that relying on file extensions is very old style.. we can keep that but I would also add flags

carlocamilloni avatar Aug 31 '19 09:08 carlocamilloni