Author Topic: Grids and Memory Usage  (Read 547 times)

patrickmelix

  • Newbie
  • *
  • Posts: 4
    • View Profile
Grids and Memory Usage
« on: October 09, 2020, 09:58:40 AM »
Dear RASPA-Devs,

In contrast to the vdW parameter assignment, the vdW grids seem not to support pattern matching of atom names. At least when I try to create a grid with a pattern instead of the full atom name, the code complains.

It seems that one can symlink a created grid file to prevent storing the same grid multiple times, but upon execution of the code, the memory consumption remains unaffected (as is to be expected).

Is it somehow possible to make the code use the same grid for several atom types in order to reduce the memory footprint of the job? Or is there another way to achieve this, that I am missing (adsorbate definition, ...)? In bigger molecules with varying atomic charges but equal vdW parameters, this is quite a bottleneck for me at the moment.

My C is really rusty, so I was not able to understand enough of the code to check myself or even implement a new feature, sorry...

Thanks for your support!
Best Regards,
Patrick

David Dubbeldam

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Re: Grids and Memory Usage
« Reply #1 on: October 20, 2020, 05:56:23 PM »
For each sigma of an adsorbate-atom it needs to create a different grid. You can list with atoms-types you would like to create grids for.
There is only a single extra grid needed for electrostatics.

patrickmelix

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Grids and Memory Usage
« Reply #2 on: October 23, 2020, 05:35:45 PM »
Dear David,

thanks for your answer. I guess my main question was not clear enough: Is it possible to make the code use the same vdW grid for two differently named atoms that have the same sigma value?

An example situation would be: Two atoms c_a and c_b, same vdW but different charges.

When creating the grid, I see that the two grid files for c_a and c_b are exactly the same (same md5sum of the vdW gridfile). When running GCMC simualtions, these two grid files are both loaded to the RAM. Ideally, I would like to tell RASPA2 to use the same grid for both atoms. This would halve the RAM requirements for that example job.

Hope this makes my question a bit more clear.
Thanks for your help!
Best Regards,
Patrick

Christopher

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Grids and Memory Usage
« Reply #3 on: November 16, 2020, 04:18:18 PM »
Just a strange idea:

would it work if you place the point charges that differ as an extra atom without charges with a fixed bond of 0.0 directly on top of the vdW bead?

Maybe you can try this.

patrickmelix

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Grids and Memory Usage
« Reply #4 on: November 17, 2020, 08:58:22 AM »
That is indeed an interesting idea, thanks for that! I'll think about it and try it next time to see the performance.

Christopher

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Grids and Memory Usage
« Reply #5 on: November 17, 2020, 10:18:34 AM »
Please take care and test if it really works. It was just an idea - I am not sure ;)

patrickmelix

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Grids and Memory Usage
« Reply #6 on: November 17, 2020, 01:08:28 PM »
There are definitively a few problems, but I couldn't think of a major problem so far... 8) Also not sure if the approach would reduce the memory consumption in all cases, since it basically doubles the amount of particles... I'll let you know once I tested it! But it is a really great idea to be considered!