The problem with the method is not about the ideas, it is about exactly how the file are modified. The error Number of coordinates in coordinate file
and System has non zero total charge:5.000 Total charge should normally be an integer
are because somehow the modification was not done right.
You can use PyMol to get the coordinate for the ions, but concatenating pdb files like cat protein01.pdb arsenic.pdb >> complex.pdb
will lead to problem.
I suggest the following:
gmx pdb2gmx -f protein00.pdb -inter -p system.top -o prot.gro
gmx editconf -f prot.gro -o box.gro -bt cubic -d 1.2
Copy box.gro
to complex.gro
. Open complex.gro
, add a line for the arsenic ion. At the bottom of the file, you will see something like this
1CPD H3 12 2.385 2.523 2.354
1CPD H4 13 2.371 2.426 2.498
1CPD H5 14 2.185 2.130 2.198
4.64298 4.64298 4.64298
Add you arsenic ion at the line before the last line, from the coordinate you get from arsenic.pdb
you generated with PyMol. Note that .gro
file are in nanometer instead of angstrom: divide the coordinate by 10. gro
file have specific column number, so take care that the coordinate are aligned with the previous one. After modification, this will look something like this (except for 15
- this should be increased from the line before by the AS line, and the coordinate):
1CPD H3 12 2.385 2.523 2.354
1CPD H4 13 2.371 2.426 2.498
1CPD H5 14 2.185 2.130 2.198
2AS AS 15 1.522 2.544 2.311
4.64298 4.64298 4.64298
At the top of the .gro
file, the second to top line is the number of atoms (here, 14
). Increase it by one:
CPD_GMX.gro created by acpype (Rev: 365) on Thu Sep 15 11:36:27 2022
14
1CPD C 1 2.363 2.211 2.260
1CPD C1 2 2.426 2.314 2.321
1CPD C2 3 2.201 2.411 2.365
Modify the last section of system.top
[ molecules ]
; Compound #mols
Protein 1
AS 1
then, solvating:
gmx solvate -cp complex.gro -cs spc216.gro -o solv.gro -p system.top
Neutralizing the system with genion
:
gmx grompp -c solv.gro -f em.mdp -p system.top -o genion.tpr
gmx genion -s genion.tpr -p system.top -o solvions.gro -neutral
gmx grompp -c solvions.gro -f em.mdp -p system.top -o em.tpr
gmx mdrun -v -deffnm em -nice 0
Note that, your forcefiel definition files should contain parameters for the AS atom, otherwise you cannot proceed anyway. Are you sure this is the case? What forcefield are you using?