plumed / plumed2

Development version of plumed 2
https://www.plumed.org
GNU Lesser General Public License v3.0
324 stars 269 forks source link

Initializing a large number of CVs #1034

Open lizhuzh opened 4 months ago

lizhuzh commented 4 months ago

Hi PLUMED developers,

I am using GROMACS 2018. In my simulation, I need to calculate large amount (~10^4) of CVs. However, I found that it takes ~30 mins to initialize these CVs at the beginning of simulation. I am wondering why this is the case and whether there is any way to make it faster.

Thanks, Lizhu

GiovanniBussi commented 4 months ago

PLUMED is not designed for that regime, but rather for the regime where there are a few (10-100) CVs. In addition to startup, I suspect you can have significant overhead also during the simulation if you use 10^4 CVs.

There are a number of CVs that are designed to compute simpler CVs on multiple combinations of atoms (e.g., all pairwise distances in a single CV). If you are more specific about what you are trying to do we can help you to obtain the same result using less CVs

lizhuzh commented 4 months ago

PLUMED is not designed for that regime, but rather for the regime where there are a few (10-100) CVs. In addition to startup, I suspect you can have significant overhead also during the simulation if you use 10^4 CVs.

There are a number of CVs that are designed to compute simpler CVs on multiple combinations of atoms (e.g., all pairwise distances in a single CV). If you are more specific about what you are trying to do we can help you to obtain the same result using less CVs

Thanks for your reply. I indeed want to calculate all pairwise distance between two groups. Which CV do you think can calculate these quantities?

GiovanniBussi commented 4 months ago

What do you want to do with those distances? There are many variables that combine multiple pairwise distances in different manners, e.g.:

and possibly others

lizhuzh commented 4 months ago

What do you want to do with those distances? There are many variables that combine multiple pairwise distances in different manners, e.g.:

  • COORDINATION

  • COORDINATIONNUMBER

  • CONTACTMAP

  • DISTANCES

and possibly others

Sorry for the late reply --- I was looking at the manual and the source codes of these CVs. What I want to do is to pass all pairwise distances to another CV (e.g. RESTRAINTS). It seems that I do not have access to these components in the above CVs. Also, it seems that those CVs you mentioned are not parallelized, except COORDINATION.Am I correct?

GiovanniBussi commented 3 months ago

Are all the restraints identical? If so you can easily do this with COORDINATION and a switching function, with a lot of flexibility on the form of the restraint (though identical on all distances)

If not you might use CONTACTMAP, with a limited for for the restraint, but different reference distances. And I think it's parallelized.

DRMSD might also be a good option, but I don't know if it's parallelized