History and Caching (history)

Remembering the commands you have run in the past is a good way to keep track of your work. Bept provides a way to save your commands in history and also cache the .in files generated by APBS for future references.

Here are the following features of the history command in Bept.

1. View and Execute

You can view the history of the pdb2pqr and apbs you have run in the past using the history command. The command will show you the list of commands using beaupy, which you can select and perform operations on. You have to mention -a or -p flag to view the history of apbs or pdb2pqr commands respectively.

Note that, running the commands in history has been divided into functionalities such as add new command, edit command, execute command, save command and delete command. This is meant so that you may want to keep your history intact yet just want to execute a command with minor tweaks. If you are adding a new command, please make sure to check edit, save and execute(to execute) boxes.

2. APBS input file Caching

The input files generated generally has to be reused multiple times with minor tweaks. You don’t want to loose that and regenerate the file again. Bept provides a way to cache the .in files generated by APBS in the cache directory. The cache directory is located where the bept is installed. You can view the cache directory path by running the history command.

bept history --print-cache-path
# OR
bept history -pc

You can also view the files in the cache directory via fzf (fallback to rich and beaupy if not installed) by running the following command.

bept history --view-apbs-cache
# OR
bept history -vc

Whenever you generate any .in file, it will automatically be symlinked from the cache directory to your current working directory. It is saved in the cache directory based on the name of the protein file plus the timestamp of the file generated. Although the symlinked file will only have the name of the protein.

3. Clearing history and cache

You can always clear the history of commands of pdb2pqr and apbs using the below command. This opens up a optionality to clear the history of pdb2pqr or apbs commands, both or none.

bept history --clear-history

You can also clear the cache directory using the below command. This will remove all the .in files generated by you in the past.

bept history --clear-apbs-cache
# OR
bept history -cac