source /usr/local/amber/amber10/dat/leap/cmd/leaprc.ff03
loadamberprep /nfs/01/osu6030/libs/MCPB/1JGM_CD_chg1.prep
loadamberparams /nfs/01/osu6030/libs/MCPB/metals.frcmod
loadamberparams /nfs/01/osu6030/libs/MCPB/1JGM_CD_sem.frcmod


p = loadpdb 1JGM_CD.pqr

bond p.HD1.NE2 p.CD1.UM
bond p.AS1.OD2 p.CD1.UM
bond p.HD2.NE2 p.CD1.UM
bond p.KX1.OX1 p.CD1.UM
bond p.HDX.O p.CD1.UM

bond p.HD3.NE2 p.CD2.UM
bond p.HE1.ND1 p.CD2.UM
bond p.WT1.O p.CD2.UM
bond p.WT2.O p.CD2.UM
bond p.KX1.OX2 p.CD2.UM
bond p.HDX.O p.CD2.UM

check p

savepdb p 1JGM_CD_amber.pdb

addions p Cl- 1
savepdb p 1JGM_CD_Cl-.pdb

solvateOct p TIP3PBOX 10
savepdb p 1JGM_CD_sol.pdb
saveamberparm p 1JGM_CD_sol.top 1JGM_CD_sol.crd

quit
