Programming your own Force Models

One powerful feature of ImAFM™ is the ability to test different tip-surface interaction models on the same data set. Data is stored as the raw intermodulation spectrum at each pixel, which is a frequency-domain representation of the tip motion. The Model Fit section of Force Reconstruction Methods describes how to use the AFM Suite to fit this data to an a force model. This fit can be done at an individual pixel (see Force Inspector) , along a liner transect (see Analyzing Linear Transects), or on an entire image (see Parameter Maps and Three dimensional viewer). Several common force models are programed in the IMP Suite, and it is very easy to program your own force model and have it appear in the IMP Suite.

Constructing a good and physically well motivated force model can be difficult. However, once you have a good force model, programing it in the AFM Suite is simple. Some knowledge of the Python language is necessary (see Python). Simply copy the examples.py file and give it a new name, e.g. my_force_model.py , keeping it in the force_models folder. Edit the copy to create your own force model. The example.py file is well documented with comment lines to help you understand the idea behind the Python code.

After you have finished with my_force_model.py, restart the AFM Suite. Your force model will be automatically loaded and it will appear as an option in the Model pull-down menu. Note that any changes you may have made to the examples.py file will not be saved, and upon restart, it will be returned to its original, default state.