In order to use Freud in a Python script or application, you must first import freud. See the python tutorial for importing basics.
The following code imports freud as a module to the current python namespace. When importing this way, you must prefix all commands with freud.*
(where *
is the class/command/etc).
import freud
It's also common to import all modules from Freud into the current namespace. If you do this, you do not need to add the freud.
prefix to your command.
from freud import *
You can also import individual packages, use shorthand, etc.
from freud import parallel
import freud.pmft
from freud import box as fbox