The following example shows how to restrict the energy calculation to the interaction energy between two chains with segment identifiers ``a" and ``b." Only the energies and forces between the selected atoms are computed.
CONStraints INTEraction 
    ( segid a ) ( segid b ) 
END
 
 This example does not include the intrachain energy.  To 
include the intrachain energy, one should specify the following:
CONStraints INTEraction 
    ( segid a or segid b ) ( segid a or segid b ) 
END
 
The following example modifies the weight of the inter- and intrachain 
interactions in the Hamiltonian, applying a weight of 0.5 to the bond energies
and forces and a factor of 0.75 to the other energy terms :
CONStraints INTEraction ( segid a or segid b ) ( segid a or segid b ) WEIGhts * 0.75 bonds 0.5 END ENDThis example includes the intrasegment bond energy and the overall intersegment energy but excludes the intrasegment angle and dihedral, improper, and nonbonded terms from the Hamiltonian :
CONStraints
    INTEraction ( segid a ) ( segid b ) WEIGhts * 1. END 
    INTEraction ( segid a ) ( segid a ) WEIGhts * 0. bonds 1. END 
    INTEraction ( segid b ) ( segid b ) WEIGhts * 0. bonds 1. END 
END
 Three double selections are set up, each with a different weighting scheme. 
The Hamiltonian is the sum of the three partial Hamiltonians. The result is to
turn off the intrasegment interactions other than the bonds.