# potfit wiki

open source force-matching

### Sidebar

User Guide

Examples

Potential Databases

More

compiling:make_examples

# Compiling potfit

Here are some examples on how to compile potfit.

#### Cleaning up

Before you compile a new binary you should make sure that there are no old object files in your directory:

make clean

deletes all object files and most temporary files.

#### Setting the options

To compile potfit you have to know which options you want to enable. You can find a comprehensive list of all options here.

Assuming you want a potfit binary to optimize EAM potentials and also include stress, you can create it with the command:

make potfit_eam_stress

Basically you can use any name for your binary, as long as the strings 'eam' and 'stress' are included. The command

make my_name-eam+stress-foo.bar-V2

would create the same binary as make potfit_eam_stress, only with a different name.

#### Parallel make

To speed up the compilation (if you are very impatient) you can use the following command

make -j 8 clean potfit_eam_stress

This will use 8 processes in parallel to compile the object files and also clean your directory before compiling a new binary.

### Custom FLAGS

To pass custom flags to the compiler, you can use the environement variable FLAGS

FLAGS="-fomit-frame-pointer" make potfit_pair_stress