Macros in Nanome
Macros are custom shortcuts you program yourself to speed up your work.

Summary
Nanome macros provide functionality for all of the following:
- Selection manipulation (Highlight and Focus on certain parts of the loaded entities)
- Command scheduling (edit the rendering and content of the selection)
- Molecular manipulation (read and write Workspace, Complexes, Molecules, Chains, Residues, Atoms)
- Search and find (Locate, search or find molecular structures, residues, atoms etc. within the scene)
- Menu manipulation (read, locate and move the UI menus available to the user)
- User manipulation (read, locate and move the User that is using the macro)
- Store manipulation (allow you to save/load states between macros)
- System manipulation (The basic functions to read and write files locally)
- Primitive types (The basic types used by the different API functions)
- Network manipulation (For experts: lets you fine-tune everything that the user can see)
Using Macros
You can open macros from the Macro submenu on your wrist or on the left side of the Entry List. Some preset macros are already there, and several of them focus on a protein's active sites.
Building Your Own Macros
To customize and/or create your own, open up your Nanome download files in Windows as shown below. You’ll find them in your Oculus, Steam or Vive folder.

Click the folder named ‘Build’, then ‘BuildAssets’, then ‘Macros’. The screenshot below shows the same folders in a downloaded copy of Nanome.

Each of these Lua files will appear in your Macro menu as a separate Macro.
- Create a new file: “MyNewMacro.lua” (or MyNewMacro.lua.txt) on your desktop
- Edit and save the macro file
- Start the macro “MyNewMacro” within Nanome
Hello world!
A macro can be just a few lines of code.
--[[
Add a short description of the macro here (optional)
]]
function main ()
Command_Notification("Hello world, my first macro!");
return "SUCCESS";
end;The programming language used here is Lua. See: https://www.lua.org/start.html
Available Commands
A macro has access to all of Nanome’s capabilities through custom functions:
See: https://github.com/nanome-ai/nanome-macros/blob/master/Documentation/API.md
Sharing Macros
Macros can be shared by copy/pasting the “.lua” file on different machines.
You can store the macros in one of the following supported folders (configurable in the config-file):
C:\Users\<USERNAME>\Desktop\
C:\Users\<USERNAME>\Downloads\
C:\Users\<USERNAME>\Documents\
C:\Users\<USERNAME>\Documents\Nanome\
C:\Users\<USERNAME>\Documents\Nanome\Macros\Optionally, a macro can be hosted through an HTTP server (configurable in the config-file).