- 1.7
- 1.6
- 1.5
- Beta
- Examples (for 1.6a)
- Misc
Automatically or manually create pattern descriptions for models.
Syntax:
void clearpatterns( | ); |
Delete the pattern description of the current model. It's a good idea to run this command before adding a pattern definition by hand with calls to newpattern.
For example:
clearpatterns();
Syntax:
void createpatterns( | ); |
Automatically detect and create the pattern description for the current model.
For example:
createpatterns();
Syntax:
pattern currentpattern( | ); |
pattern currentpattern( | name); |
string | name; |
pattern currentpattern( | id); |
int | id; |
Get the named pattern or pattern with given id (if either was specified), returning its reference and setting it to be the current pattern.
For example:
pattern p = currentpattern("liquid");sets the pattern named 'liquid' in the current model to be the current pattern, setting its reference in the variable p.
pattern p = currentpattern();
returns a reference to the current pattern.
Syntax:
pattern getpattern( | name); |
string | name; |
pattern getpattern( | id); |
int | id; |
Get the named pattern, or pattern with id specified, returning its reference.
For example:
pattern p = getpattern("solid");gets the pattern named 'solid' in the current model, setting its reference in the variable p.
getpattern(3);
gets the third pattern in the current model.
Syntax:
pattern newpattern( | name, | |
| nmols, | ||
atomspermol); |
string | name; |
int | nmols; |
int | atomspermol; |
Add a new pattern node to the current model, spanning nmols molecules of atomspermol atoms each, and called name. A reference to the new pattern is returned.
For example:
pattern p = newpattern("water", 100, 3);creates a new pattern description of 100 molecules of 3 atoms each named 'water' (i.e. 100 water molecules) in the current model, and returns its reference

