Forcefield Commands

Forcefield Commands

Forcefield management and manual term creation.

angledef

Syntax:

void angledef(form,  
 type_i,  
 type_j,  
 type_k,  
 data1,  
 ...); 
string  form;
string  type_i;
string  type_j;
string  type_k;
double  data1;
 ...;

Add an angle definition to the current forcefield. form should correspond to one of the implemented angle functional forms, while the three types refer to either type or equivalent names of defined atom types. Up to ten data parameters may be supplied.

bonddef

Syntax:

void bonddef(form,  
 type_i,  
 type_j,  
 data1,  
 ...); 
string  form;
string  type_i;
string  type_j;
double  data1;
 ...;

Add a bond definition to the current forcefield. form should correspond to one of the implemented bond functional forms, while the two types refer to either type or equivalent names of defined atom types. Up to ten data parameters may be supplied.

clearmap

Syntax:

void clearmap(); 

Clear any manual typemap definitions.

For example:

clearmap();

clearexportmap

Syntax:

void clearexportmap(); 

Clear any manual export typemap definitions.

For example:

clearexportmap();

clearexpression

Syntax:

void clearexpression(); 

Removes any forcefield expression defined for the current model.

For example:

clearexpression();

createexpression

Syntax:

void createexpression(); 

Creates a suitable energy description for the current model.

For example:

createexpression();

defaultff

Syntax:

void defaultff(ff); 
string|forcefield  ff;

Makes the supplied/named forcefield the default forcefield to use when none is associated.

For example:

defaultff("oplsaa");

equivalents

Syntax:

void equivalents(name,  
 typename(s),  
 ...); 
string  name;
string  typename(s);
 ...;

Define equivalent terms in the current forcefield. name is the new typename to which the list of quoted typenames are linked, for subsequent use in intramolecular term definitions. See the equivalents forcefield keyword for more information.

exportmap

Syntax:

void exportmap(maps); 
string  maps;

Set up manual mappings that convert atomtype names when expression are exported. Works in the opposite way to the 'map' command.

For example:

map("CT=Ctet,N3=N");

converts the atomtype names 'CT' and 'N3' so that they appear as 'Ctet' and 'N' in any expression files written out.

ffmodel

Syntax:

void ffmodel(); 

Associates current forcefield to the current model.

For example:

ffmodel();

ffpattern

Syntax:

void ffpattern(pattern); 
string  pattern;
void ffpattern(patternid); 
int  patternid;
void ffpattern(p); 
pattern  p;

Associates current forcefield to the current pattern, or one specified by either a reference, integer ID in the current model, or a pattern pointer.

For example:

ffpattern();

associates the current forcefield to the current pattern.

ffpattern("bulk");

associates the current forcefield to a pattern named 'bulk' in the current model.

finaliseff

Syntax:

void finaliseff(); 

Perform necessary operations on the current forcefield once all data has been added. Must be called!

fixtype

Syntax:

void fixtype(typeid,  
 id = 0); 
int  typeid;
atom|int  id = 0;

Set the current atom selection, or the specified atom, to have the type id (in the current forcefield) specified. Types set in this manner will not be overwritten by tha typing routines, allowing specific types to be applied above the normal rules. Note that the type's NETA description is not checked, and so any (even types not matching the base element) may be applied in this way.

For example:

typedef(99, "NX", "NX", N, "-C(n=4)");
select(C);
fixtype(99);

assigns newly-created type 99 (specific to nitrogen) to all carbons in the model.

fixtype

Syntax:

void freetype(id = 0); 
atom|int  id = 0;

For the current atom selection, or the specified atom, free any previously-fixed types

For example:

freetype(14);

frees any previously-set type on atom 14.

getcombinationrule

Syntax:

string getcombinationrule(form,  
 parameter); 
string  form;
string  parameter;

Returns the combination rule in use for the specifed parameter of the given functional form. The form and related parameter should correspond to those given in the VDW functional forms table. A string corresponding to one of the available combination rule options is returned.

For example:

string cr = getcombinationrule("lj", "epsilon");

getff

Syntax:

forcefield getff(name); 
string  name;
forcefield getff(id); 
int  id;

Select the named forcefield (or forcefield with the specified id) and make it current, returning a reference to it in the process.

For example:

forcefield uff = getff("uff");

makes the loaded forcefield named 'uff' the current one, and stores a reference to it.

interdef

Syntax:

void interdef(form,  
 typeid,  
 charge,  
 data1,  
 ...); 
string  form;
int  typeid;
double  charge;
double  data1;
 ...;

Add a new short-range data definition to a type in the current forcefield. form should correspond to one of the implemented VDW functional forms. Up to ten parameters for the VDW potential may be given.

loadff

Syntax:

forcefield loadff(file,  
 name); 
string  file;
string  name;

Load a forcefield from file and reference it by name. Becomes the current forcefield.

For example:

loadff("/home/foo/complex.ff", "waterff");

loads a forcefield called 'complex.ff' and names it 'waterff'.

map

Syntax:

void map(map,  
 ...); 
string  map;
 ...;

Set up manual typename mappings for atom names that do not readily correspond to element symbols, forcefield types etc. All atoms that are subsequently created using name as the element are automatically converted to the corresponding element.

For example:

map("CT1=C,CT2=C");

converts atoms with names 'CT1' and 'CT2' to carbon.

newff

Syntax:

forcefield newff(name); 
string  name;

Create a new, empty forcefield with the given name and make it current. Returns a reference to the new forcefield.

For example:

forcefield ff = newff("testff");

printsetup

Syntax:

void printsetup(); 

Prints the current expression setup.

For example:

printsetup();

recreateexpression

Syntax:

void recreateexpression(); 

Delete and recreate a suitable energy description for the current model.

For example:

recreateexpression();

rules

Syntax:

void rules(ruleset); 
string  ruleset;

Set rules set to use for parameter generation in the current forcefield (see forcefield fules for more info).

Note: The implementation of rule-based forcefields will change in a future release.

saveexpression

Syntax:

int saveexpression(filter,  
 filename); 
string  filter;
string  filename;

Export the forcefield expression for the current model in the format determined by the filter nickname, to the filename specified. Return value is '1' for successful write, or '0' otherwise.

For example:

saveexpression("dlpoly", "data.FIELD");

setcombinationrule

Syntax:

void setcombinationrule(form,  
 parameter,  
 rule); 
string  form;
string  parameter;
string  rule;

Sets the combination rule to use for the specifed parameter of the given functional form. The form and related parameter should correspond to those given in the VDW functional forms table, while rule should correspond to one of the available combination rule options.

For example:

setcombinationrule("lj", "sigma", "geometric");

torsiondef

Syntax:

void torsiondef(form,  
 type_i,  
 type_j,  
 type_k,  
 type_l,  
 data1,  
 ...); 
string  form;
string  type_i;
string  type_j;
string  type_k;
string  type_l;
double  data1;
 ...;

Add a torsion definition to the current forcefield. form should correspond to one of the implemented torsion functional forms, while the four types refer to either type or equivalent names of defined atom types. Up to ten real-valued parameter values for the function may be provided.

typedef

Syntax:

int typedef(typeid,  
 name,  
 equiv,  
 element,  
 neta,  
 description = ""); 
int  typeid;
string  name;
string  equiv;
string|int  element;
string  neta;
string  description = "";

Add a new atom type definition to the current forcefield, with the identifying typeid and called name, with the equivalent typename equiv. The basic element of the new type is given as element, and neta is the NETA definition of the type. An optional string describing the type in more detail can be given in description. The command returns '1' if the model was typed successfully or '0' otherwise.

For example:

typedef(101, "Ctet", C, "nbonds=4", "Standard tetrahedral carbon");

creates a new simple type for a carbon atom with four bonds.

typemodel

Syntax:

int typemodel(); 

Perform atom typing on the current model. Returns '1' if atom typing was performed successfully or '0' otherwise.

For example:

int success = typemodel();

typetest

Syntax:

int typetest(typeid,  
 id); 
int  typeid;
atom|int  id;

Test the current forcefield's atomtype typeid on the atom specified, returning the type score of the match (zero indicating no match).

For example:

int score = typetest(112,10);

tests typeid 112 on the tenth atom in the model.

units

Syntax:

void units(unit); 
string  unit;

Sets the units in which energetic parameters are given for the current forcefield. For a list of available units see energy units.

vdw

Syntax:

void vdw(calculate); 
bool  calculate;

Controls calculation of van der Waals terms in energy / force calculations (on by default).

For example:

vdw("off");

turns van der Waals energy / force calculation off.

vdw(TRUE);

turns van der Waals energy / force calculation on.