Writing fixes is the main way of extending LAMMPS. User can implement many things using fixes, including (but not limited):
· changing particles characteristics (positions, velocities, forces, etc.). Example: fix_freeze.
· reading/writing data. Example: fix_restart.
· implementing boundary conditions. Example: fix_wall*.
· saving information about particles for future use (previous positions, for instance).
Java Modeling Language
Java Modeling Language is a Design by Contract(DBC) specification language for Java programs. DBC is a programming methodology, which was introduced by B. Meyer and implemented in Eiffel programming language. The idea is pretty simple – a program component must do exactly what is described in the contract. Hence, a user of the component may learn about it using the contract, the implementation of the component might be different by must follow the contract. In Object Oriented languages a component is a class and a contract regulates the state of an object as well as behavior. Using JML a programmer may specify the contract for methods and attributes. It is written as a comment in the class and translated by the JML compiler into the Java code.