Problem with predefined cavity location in tpic

GROMACS version:2022.3
GROMACS modification: Yes/No
Hi,

I want to do test particle insertion with the tpic option. The manual says that one coordinate extra is read from the trajectory, which is used as the insertion location. How can I define a cavity for the particle insertion?

It is the last, extra, coordinate in the trajectory file.

1 Like

Thanks for your reply!
Is the following procedure correct:
1-converting .xtc file (one frame) to .gro file
2-insert arbitrary coordinates at the end of .gro file for the cavity location(I am not sure how to insert them! )
3-converting .gro to .xtc file

Why do you want to use TPIC if you are going to use an arbitrary location? That sounds like you would want to do basic TPI.

1 Like

Honestly, I do not know how to use tpic correctly.
I want to obtain chemical potential by test particle insertion in cavities of a simulation box.
I tried basic tpi and the results were not acceptable.

Then TPI is what you should use, not TPIC.

But TPI will only give a reasonable answer when there are (now and then) cavities that your molecule fits into. In most cases you will need billions of attempts.

1 Like

In the link below on page 291, the following explanation convinced me to use tpic:

As insertions into regions already occupied by atoms contribute a negligible amount to the mu, biased insertions are performed only where there is free volume…
The set of free-volume sites for a given snapshot is then passed into a modified version of Gromacs’ particle-insertion routine, tpi.c, in which insertions are performed in each of the voxels centered on the grid points.

https://pubs.acs.org/doi/10.1021/acs.jpcb.6b09690

Sure, but then you need to know where those cavities are. If you know, you can put in the coordinates. If you don’t know, you should use basic TPI.

1 Like

Does GROMACS have any options to find the coordinates of cavities?

I think you are misunderstanding how TPI works. The TPI method is all about finding the cavities, albeit through a rather inefficient method of random insertion using uniform sampling. As said, you often need billions of steps. When I did TPI calculations more than a decade ago, I needed many hours per calculation. Nowadays computers are much faster, but the cost depends extremely strongly on the presence and size of cavities.

1 Like

I know how TPI works, but TPIC is unclear to me. Based on one of your replies, in TPIC I need coordinates of the cavities. If it is correct, how can I get them?

I don’t know how you can get cavity locations for your system.

I have used TPIC with the, not uncommon, approach where one creates a cavity by putting in a large LJ sphere in which one can then insert molecules.

1 Like

Maybe it works for me. Is there any reference you could suggest to me?

Sorry, I don’t have time now to look for references.

Thank you for your time. I appreciate it.