SerialEM setup
Contents
SerialEM setup
In this section, you’ll find how to set up SerialEM for SmartScope use.
Calibrations
To ensure maximal precision of targeting and coordinate conversion, it is crucial that LM pixel size and rotation angle calibrations are verified before using SmartScope. In the event of targeting problems between the atlas and squares, where squares are off-centered, it is very likely due these calibrations being off.
1- Setting up external python for SerialEM
Documentation on how to set up can be found on the SerialEM website. We have now installed on a few systems and here are some examples for setting up the SerialEMproperties.txt
.
SocketServerIP 1 xxx.xxx.xxx.xxx
, is the IP where the FEI-SEM-server.exe
is running
Otherwise, SockerServerIP 7
should be the IP of the SerialEM PC.
Example: Talos Arctica with K2 or K3
Microscope PC IP: 192.168.0.3
Gatan PC IP: 192.168.0.32
SerialEM is installed on the Gatan PC
The following lines should be added to
SerialEMproperties.txt
.SocketServerIP 1 192.168.0.3 SocketServerPort 1 48892 SocketServerIP 7 192.168.0.3 SocketServerPort 7 48888 EnableExternalPython 1
Note
SerialEM needs to be restarted after changing properties.
Testing the connection to serialEM
To quickly test if your settings are good for the python connection to SerialEM, you can use the following commands and replace IP by the gatan PC address and port by 48888.
From our examples above, the Talos Arctica IP would be 192.168.0.32 and port would be 48888.
docker exec smartscope smartscope.py test_serialem_connection IP port
### EXAMPLE ###
docker exec smartscope smartscope.py test_serialem_connection 192.138.0.32 48888
If the connection is successful, a Hello from smartscope
message should appear in the SerialEM log window. Now, you can proceed to adding a microscope.
2- Register a microscope to the SmartScope database
Now that the connection to SerialEM works, we can add our microscope to the database.
To do so, navigate to the admin portal and then the Microscopes section and add microscope. It should bring you to localhost:48000/admin/API/microscope/add/.

General
Name: Should be however your facility calls the microscope. i.e. Arctica, Krios-1
Location: Usually the name of the center. i.e. NIEHS
Hardware constants
Voltage: Microscope Voltage on kV
Spherical abberation: Microscope spherical abberation
Loader Size: For Autloader microscopes, the value should be 12. Side entry should be 1. If you have a JOEL scope and cannot run a LoadCartridge command from SerialEM, it should be set to 1
Smartscope Worker
Worker Hostname: Should remain localhost unless SmartScope is set up as a master-worker configuration. More details soon
Executable: Should remain smartscope.py unless SmartScope is set up as a master-worker configuration. More details soon
SerialEM external python connection
Serialem IP: IP of the SerialEM computer.
Serialem PORT: Port of the serialEM python socket. default is 48888. It depends on how is was set up in
SerialEMproperties.txt
in step 1.
Filesystem Paths
These two paths should be pointing to the same directory. One is for SerialEM to save the files in the windows computer. The other is for SmartScope to find the files saved by SerialEM.
Windows path: Path of the directory where SerialEM will save the files, viewed from the SerialEM PC
Scope path: Path of the directory where SerialEM will save the files, viewed from the SmartScope container.
Here’s a example:
Let’s say the data is going to be saved in
X:\\smartscope
and theX:\\
drive is mounted to the linux computer at/mnt/gatan_RaidX/
.Also, let’s assume that the
/mnt/gatan_RaidX/:/mnt/krios/
bind was set up in the volumes of the smartscope service in thedocker-compose.yaml
.In that case,
X:\\smartscope
is equivalent to/mnt/krios/smartscope
in the smartscope container.Then, the microscope
Windows path= X:\\smartscope
andScope path= /mnt/krios/smartscope
Note
Please make sure that this path is writable by both SerialEM and SmartScope.
3- Register a microscope to the SmartScope database
Similarly to adding a microscope, navigate to the admin portal and then the Detectors section and add. It should bring you to localhost:48000/admin/detector/add/.

Details coming soon.
4- Low-dose Presets
The idea is to generate a settings file with low-dose mode presets that will work well with the current version of SmartScope.
The following table provides guidelines on how to set up the low-dose mode settings for different microscopes:
Example 1 |
Example 2 |
|
Instrument |
||
Microscope |
Talos Arctica |
Titan Krios G4 |
Detector |
Gatan K2 Summit |
Gatan K3 |
Energy Filter |
Gatan Bioquantum |
|
Low Dose Preset |
||
Search |
||
magnification |
210 |
580 |
Pixel size (A/pix) |
196 |
152 |
Mode |
Linear |
Counting |
View |
||
magnification |
2600 |
8700 |
Pixel size (A/pix) |
16.1 |
10.1 |
Mode |
Linear |
Counting |
Focus/Record |
||
magnification |
36,000 |
81,000 |
Pixel size (A/pix) |
1.19 |
1.08 |
Mode |
Counting |
Counting |
Mont-map/Full grid montage |
||
magnification |
62 |
135 |
Pixel size (A/pix) |
644 |
654 |
Mode |
Linear |
Counting |
Search
The search mag is set in LM mode to allow the capture of an entire square in a single acquisition. On a K2 detector, we suggest using linear mode for search to maximize contrasts.
View
The view mag is using a low SA mode magnification to view a few holes. It is currently only used to re-center on a hole.
Preview
Currently, Preview is used to acquire the main high-magnification acquisition because of initial limitations with SerialEM. Ensure that dose-fraciionation and exposure times are set for that purpose.
Record
Currenly used to acquire the atlas. Atlas is acquired outside of low-dose mode and current scripting commands for acquiring montage will use Record by default.
Note
We’re currently testing how to reliably use the mont-map preset for the atlas acquisition, which will allow us to use Record instead of Preview for the acquisition.
Focus/Trial
Used for autofocus and drift correction. For autofocus, the specified image-shift position that is set will be used for each sample. We suggest changing it when doing data collection to ensure that the focus area illuminates between holes.
Note
This will also be changed in the near future. We plan on including automatic focus positioning relative to the mesh spacing and orientation.
5- Non Low-dose Presets
The easiest way to set up for the atlas is to create an imaging state for mont-mapping. This way, when acquiring the atlas, it will use the mont-map setting instead of Record.
6- Hole Reference Image
Note
This procedure will need to be repeated if a different hole size or the View preset is modified.
A hole reference needs to be provided to realign to holes at the View mag. Here’s how to create it:
Run eucentricity and autofocus on a square
Acquire View
Center on a hole
Change the cropping of View to only view one hole
Acquire View
Save the image with the following name:
File -> Save to other -> Save to /scope_path/reference/holeref.mrc
Reset cropping to full.
Note
Using a single static hole reference is a temporary solution that will be modified in the near future.