CHARMM Development Project
Posted By: Anmol IC Edit not modifying coordinates - 11/09/21 06:36 AM
I am trying to change a particular dihedral for a known set of coordinates by editing the IC. The IC changes but coordinate remains the same.
I could not figure out the mistake in following code.

stream toppar.str
stream @str
set residue @resi

read sequence @resi 1
generate @resi first none last none setup warn

read coor card name @resicrd

ic fill ! preserve

set value -180

label repeat
ic edit
  dihedral 1 N1 1 C3 1 C4 1 C5 @value
ic print
coor init sele (type N1 .or. type C3 or. type C4 .or. type C5) end
ic build

open unit 30 write form name @resi_@value.pdb
write coor pdb unit 30
close unit 30
incr value by 15
if @value eq 180 then
   goto repeat

Posted By: rmv Re: IC Edit not modifying coordinates - 11/09/21 03:21 PM
The script is not sufficient for diagnosis; there are probably some major hints in the output log file and .pdb files.

For changing a dihedral via IC EDIT, COOR INIT, and IC BUILD, one way is to apply COOR INIT to all atoms on only one side of the dihedral, e.g. N1, C3, and all of atoms connected to those atoms. For a small molecule, you could probably use COOR INIT on all of the atoms. Also, there could be issues if the 4 atoms listed in IC EDIT are not already part of an existing IC entry from the topology file.
Posted By: Anmol Re: IC Edit not modifying coordinates - 11/10/21 02:26 AM
Thanks for your reply. The same script works now. As you pointed out, the dihedral mentioned had wrong atom order, thus was not part of existing IC and was not being used to generate the coordinates.
© CHARMM forums