Modifying topology file

Hello All,

This may be a very simple task, but how can I manually add ions to my topology file and then create the proper gro file with water and ions? I seem to be running into an error in properly adding the ions. Thank you in advance.

May be better off solving the error you are getting, since it could be something that will persist. What command did you use? What was the output? Best to copy and paste exactly, rather than filter through you.

Personally I have separate coordinate files each for a single chloride and sodium ion, and insert them using gmx insert-molecules then edit the using a text editor. Depending on the number, that can be either before or after the system is solvated.

1 Like

Thank you for your reply. To add salt I use the following commands after solvating the system:

  1. gmx grompp -f ions.mdp -c solv.gro -p -o ions.tpr

  2. gmx genion -s ions.tpr -o solv_ions.gro -p -pname NA -nname CL -neutral -conc

With this, gmx genion begins to add ions but is eventually interrupted by the fatal error: ‘No more replaceable solvent!’. Also to note - I am trying to add concentrations of 2M and higher, this approach has worked below 2M. Thank you again.

How many waters are in the system? Are they continuous in the coordinate file? How many ions are needed to be added to reach the 2M concentration?

One of the developers or those with better knowledge of how the back end of the genion code works will probably need to provide a comment on what is happening here.

For reference, here is where you mentioned this problem previously - Ion Concentration Force Fields

genion can’t find any place to put an ion that doesn’t clash with the other ions, as determined by a radius set via -rmin. You can try decreasing that value slightly to see if it allows you to add enough ions. Otherwise, use gmx insert-molecules as @Dr_DBW is suggesting rather than using genion. I suspect you’ll have to delete so much solvent that you’re just going to end up with floating crystals of salt with as many waters as will be removed.

@jalemkul @Dr_DBW Thank you for your suggestions, I appreciate it. Reducing -rmin does resolve this and I can reach the desired concentration, but I am curious as to implications that this may have later on in the simulation.

Answer to those questions will help inform the answer to your question.

@Dr_DBW After going through, it seems that at these high concentrations there is not enough water to be replaced to meet these conditions as was stated earlier. Thank you for your time, I appreciate it.