| |
 |  |  |
 | Command |  | Argument |  | Datatype |  | Default |
 | Min |
 | Max |  |  |
 | Format: |
 | SwapBond |
| Atom selection 1, |  | SELECTION |  |
- |  | - |  | - |  |  | |  |
| | Atom selection 2, |  | SELECTION |  |
- |  | - |  | - |  |  | |  |
| | Order = Bond order, |  | FLOAT |  |
1.0 |  | 1.0 |  | 3.0 |  |  | |  |
| | update = Yes | No |  | STRING |  | Yes |
 | - |
 | - |  |  |
 | Python: |
 | SwapBond(selection1,selection2,order=None,update=None) |
 |  |  | Menu: |  | Edit > Swap > Bond |  |  |  | Related: |
 | AddBond
, DelBond, TypeBond
, pH, AddSpring
|  |  |
 | Required: |  |  |  |
 |
The SwapBond
command changes the order of covalent bonds between selected atoms. The same action is performed by the
AddBond command if two already bound atoms are selected.
The easiest way to swap a bond manually is by marking two atoms like when measuring a distance,
and then clicking 'Swap > Bond' in the atom context menu of the atom marked with white fireflies.
Many more details, especially about bond orders, can be found at the
AddBond command and here
. If the selected object contains hydrogen atoms, the
SwapBond command will automatically update all hydrogens to match the new bond order,
unless the update flag is set to 'no'. E.g. if you have an ethane molecule and swap the single bond to a double bond,
the six sp3 hydrogens will be replaced by four sp2 hydrogens, resulting in ethene.
Example 1:
SwapBond 105,109,1.5
Swap the order of the bond between atoms 105 and 109 to 1.5.
Example 2:
SwapBond all,all,1
Swap all bond orders to single bonds.
|