- 1.7
- 1.6
- 1.5
- Beta
- Examples (for 1.6a)
- Misc
Create bonds and perform automatic bonding operations.
Syntax:
void augment( | ); |
Augments bonds in the current model, automatically determining multiple bonds based on the valency of atoms, and aromaticity based on double bonds in rings.
For example:
augment();
![]() | See also: |
|---|---|
|
Syntax:
double bondtolerance( | ); |
double bondtolerance( | tol); |
double | tol; |
Adjust the bond calculation tolerance. It may often be necessary to tweak the bond tolerance in order to get Aten to recognise patterns within models correctly. The current or new bond tolerance is returned.
For example:
bondtolerance(1.20);
sets the bonding tolerance to 1.2.
double tol = bondtolerance();
retrieve the current bond tolerance.
![]() | See also: |
|---|---|
|
Syntax:
void clearselectedbonds( | ); |
Delete all bonds in the current atom selection.
For example:
clearselectedbonds();
Syntax:
void newbond( | i, | |
j); |
atom|int | i; |
atom|int | j; |
void newbond( | i, | |
| j, | ||
bondtype); |
atom|int | i; |
atom|int | j; |
string|int | bondtype; |
Create a new bond in the model between the specified atoms. The optional bondtype argument specified the type of bond: e.g. single (default), double, or triple. Alternatively, an integer number representing the bond order may be given.
For example:
newbond(4, 5, "double");
creates a double bond between the fourth and fifth atoms in the model.
newbond(1, 2, 3);
creates a triple bond between the first and second atoms in the model.
atom i,j;
i = newatom("C", 0, 0, 0);
j = newatom("H", 0, 1.08, 0);
newbond(i, j, "single");creates a new single bond between two atoms, supplied as references.
Syntax:
void newbondid( | i, | |
j); |
int | i; |
int | j; |
void newbondid( | i, | |
| j, | ||
bondtype); |
int | i; |
int | j; |
string|int | bondtype; |
Create a new bond in the model between atoms referenced by their temporary ID, set manually with the setid command. Otherwise identical to the newbond command.
Syntax:
void rebondpatterns( | ); |
Calculate bonding in the current model, but restrict bond creation to between atoms in individual molecules of defined patterns.
For example:
rebondpatterns();
'rebondpatterns' can be useful when molecules in a system are too close together to have the correct bonding detected. In such a case, bonds and any old patterns in the model may be cleared, new patterns created by hand, and then 'rebondpatterns' used to calculate bonds only between the atoms of individual molecules in the defined patterns in order to recreate the original molecules.
For example:
clearbonds(); # Delete existing bonds in model
clearpatterns(); # Delete any existing patterns in the model
newpattern("benzene", 100, 12); # Add new pattern: 100 molecules of benzene (12 atoms), followed by...
newpattern("ether", 50, 15); # ...50 molecules of diethyl-ether (15 atoms)
rebondpatterns(); # Calculate bonds within individual benzene and ether molecules

![[Note]](images/note.png)