In the following example, planarity restraints are defined that restrain one group consisting of four DNA bases. This will ensure that the four bases form a plane. Additional planarity restraints could be defined by specifying more group statements.
restraints plane group selection=( (not( name P or name O1P or name O2P or name O5' or name H5T or name H1' or name H2' or name H3' or name H4' or name H5' or name H2""" or name H5""" or name O3' {or name C1'} or name C2' or name C3' or name C4' or name C5' or name O4' or name H3T) and residue 1 ) or (not( name P or name O1P or name O2P or name O5' or name H5T or name H1' or name H2' or name H3' or name H4' or name H5' or name H2""" or name H5""" or name O3' {or name C1'} or name C2' or name C3' or name C4' or name C5' or name O4' or name H3T) and residue 6 ) or (not( name P or name O1P or name O2P or name O5' or name H5T or name H1' or name H2' or name H3' or name H4' or name H5' or name H2""" or name H5""" or name O3' {or name C1'} or name C2' or name C3' or name C4' or name C5' or name O4' or name H3T) and residue 10 ) or (not( name P or name O1P or name O2P or name O5' or name H5T or name H1' or name H2' or name H3' or name H4' or name H5' or name H2""" or name H5""" or name O3' {or name C1'} or name C2' or name C3' or name C4' or name C5' or name O4' or name H3T) and residue 15 ) ) weight=400.0 end ? end {* The planarity energy term needs to be turned on.*} flags include plan end