change

Change specified parts of a topology.

change [parm <name> | parmindex <#> | <#> | crdset <COORDS set> ] 
      { resname from <mask> to <value> | 
        chainid of <mask> to <value> | 
        oresnums of <mask> min <range min> max <range max> | 
        icodes of <mask> min <char min> max <char max> resnum <#> | 
        atomname from <mask> to <value> | 
        addbond <mask1> <mask2> [req <length> <rk> <force constant>] 
         removebonds <mask1> [<mask2>] [out <file>] 
         bondparm <make1> [<mask2>] {setrk|scalerk|setreq|scalereq} <value> 
        { mass|charge} [of <mask1>] {to <value>|fromset <data set> |
          mergeres firstres <start res#> lastres <stop res#> }
}

parm <name> | parmindex <#> | <#> | crdset <COORDS set> Topology to change.
resname from <mask> to <value> Change residue names for residues in <mask> to the given <value>.
chainid of <mask> to <value> Change the chain ID of residues in <mask> to given <value>.
oresnums of <mask> min <range min> max <range max> Change original residue numbers (to e.g. original PDB numbers) of residues in <mask> to a range starting from <min> and ending with <max>.
icode of <mask> min <char min> max <char max> <resnum> <#> Change residue insertion codes of residues in <mask> to a range of characters starting from <min> and ending with <max>; set the original residue number to <resnum>.
atomname from <mask> to <value> Change atom names for atoms in <mask> to the given <value>.
addbond <mask1> <mask2> Add bond between atom specified by <mask1> and atom specified by <mask2>.
[req <length>] The equilibrium bond length in Angstroms.
[rk <force constant>] The bond force constant in kcal/mol*Angstrom.
removebonds <mask1> [<mask2>] Remove bonds from atoms in <mask1>. If <mask2> also given, remove bonds between atoms in <mask1> and atoms in <mask2>.
[out <file>] If specified, write removed bonds to <file> with format ‘<residue name> <residue num> <atom name> <atom num>‘.
bondparm <mask1> [<mask2>] {setrk|scalerk|setreq|scalereq} <value> Modify bond parameters in bonds selected by <mask1> (and <mask2> if specified) by specified <value>.
setrk Set bond force constants to <value>.
scalerk Scale bond force constants by <value>.
setreq Set bond equilibrium lengths to <value>. scalereq Scale bond equilibirum lengths by <value>.
mass|charge Change mass or charge in specified topology.
of <mask> Atoms to change mass/charge of.
to <value> Value to change mass/charge to.
fromset <data set> Use values in <data set> for mass/charge; must have the same number of values as atoms selected by <mask>.
margeres Merge consecutive residues.
firstres <res#> Index (starting from 1) of first residue to merge.
lastres  <res#> Index (starting from 1) of last residue t merge, should be greater than firstres.

Change specified parts of the specified topology. For example, to change atoms named ‘HN’ to ‘H’ in topology 0:

change parmindex 0 atomname from @HN to H

Some more examples of the use of this command:

change oresnums of :1-317 min 32 max 348
change chainid of :1-317 to A
change oresnums of :318-449 min 60 max 191
change chainid of :318-449 to D
parm step9.pdb
loadcrd step9.pdb name edited
change crdset edited chainid to A of :1
change crdset edited chainid to B of :2-639
change crdset edited chainid to C of :640-658
change crdset edited chainid to D of :659
change crdset edited chainid to E of :660-1297
change crdset edited chainid to F of :1298-1316
prepareforleap crdset edited name from-prepareforleap \
      out from-prepareforleap-tleap.in leapunitname x \
      pdbout from-prepareforleap.pdb nowat noh
go
parm ../AFV.parm7
trajin ../AFV.nc
align first !@H=
atomicfluct MyFluct #out AFV.myfluct.dat
run
change mass fromset MyFluct
parm step3_input.parm7
change chainid of :1-236 to A 
change chainid of :237-665 to B
parm from-prepareforleap.pdb
loadcrd from-prepareforleap.pdb name edited
change crdset edited chainid to A of *
change crdset edited oresnums of * min 1 max 19
crdout edited renumbered.pdb
run