Skip to main content

tem-simulator-scripts

This repository contains convenient scripts for the TEM-Simulator V1.3 (http://tem-simulator.sourceforge.net/)

Installation

conda create -n temscripts -c conda-forge python=3.9 biotite
conda activate temscripts
pip install tem-simulator-scripts

Make also sure that IMOD is installed, as the tsimscripts_pipe.sh needs the commands submfg and trimvol from IMOD.

Preparation

Download all PDBs you want to simulate. In case PDB is not available (only PDBx or mmcif), download PDBX or mmcif and convert it to PDB with https://mmcif.pdbj.org/converter/index.php?l=en . Its recommended to download directely the biological assemblies.

Overview

Here we give a short overview of the scripts contained in this package:

  • tsimscripts_pipe.sh: This is probably the only script a user needs from this collection.
  • tsimscripts_gen_coords.py: Generates coordinates for particles that are not overlapping.
  • tsimscripts_gen_input.py: This script generates the input file for the TEM-Simulator.
  • tsimscripts_gen_filaments.py: Generate simulated filaments.
  • tsimscripts_gen_raw_tilt.py: Generates the raw tilt file for IMOD.
  • tsimscripts_gen_trans_file.py: Some PDBs needs transformation files. Simply use assemblies to avoid this script.
  • tsimscripts_gen_map.py: Script to generates vesicle or fiducial maps.
  • tsimscripts_extract.py: Extracts subvolumes of the simulated tomogram.

Pipeline all commands

A convenient script is fully automating the whole process incl. reconstruction.

It requires that imod is installed. The require files for simulating filaments can be found in resources/filament_files

A sample command looks like this:

tsimscripts_pipe.sh --pdbs pdbs/*.pdb --npdbs 150 --output out_sim_tomo_1 --random_seed 10 --pdbs_fil filament_files/*.pdb --settings_fil filament_files/*.json --nsubs 100 --dose 15000 --random_seed 10

It will generate a tomogram with all pdbs included in the folder pdbs/ and will add 4 vesicles and 10 fiducials.

How to simulate a tomogram with particles from a single PDB

You can also run each step individually in case you want to have more control:

  1. Install the package with python setup.py install
  2. Optional: Generate trans files using tsimscripts_gen_trans_file.py. Not necessary when using biological assemblies directly.
  3. Optional: Generate fiducial using tsimscripts_gen_map.py: I would add 8-10 fiduicals. Patch tracking didnt work well.
  4. Generate coordinate tsimscripts_gen_coords.py
  5. Generate input file using tsimscripts_gen_input_file.py
  6. Generate raw tilt file with tsimscripts_gen_raw_tilt.py
  7. Run TEM-simulator input.txt
  8. Reconstruction with etomo
    • During Coarse Alignement I needed to use a low freq. rolloff sigma of 0.01, a high freq. cutoff sigma of 0.25 and a high freq. rolloff sigma of 0.05. Moreover I activated the option No Cosine Stretch.
    • In Final Aligned Stack Complete I set the binning to 2
    • In Tomogram Generation In Progress I set the the thickness in Z to 300
  9. Extract the subvolumes with tsimscripts_extract.py: If you have used fiducials, check if they are centered in the extracted tomograms. If they offcentered, repeat the alignement in step 7.

How to simulate a tomogram with particles from multiple PDBs

Here is a complete example how to simulate a tomogram. It assumes that there are several pdbs in the folder pdbs/. Only the PDB 6x9q needed a trans_file in this example.

tsimscripts_gen_map.py fiducial -d 50 --apix 1 -v 10000
mkdir trans_files
tsimscripts_gen_trans_file.py pdbs/6x9q.pdb
mv 6x9q_trans.txt trans_files/
tsimscripts_gen_coords.py --pdbs pdbs/*.pdb --npdbs 20 -o coords/
tsimscripts_gen_input.py --pdbs pdbs/*.pdb fiducial.mrc --trans trans_files/6x9q_trans.txt --coords coords/*.txt --defocus_upper 6 --defocus_lower 7
TEM-simulator input.txt

Metadata

Release files for tem-simulator-scripts 0.1.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tem-simulator-scripts 0.1.8.1
File Size Uploaded Provenance Actions
tem-simulator-scripts-0.1.8.1.tar.gz 90.2 kB Without provenance Details for tem-simulator-scripts-0.1.8.1.tar.gz

Release files / tem-simulator-scripts-0.1.8.1.tar.gz

Download URL tem-simulator-scripts-0.1.8.1.tar.gz
Size 90.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4065da38a155706e2fc1c615a8af8a5ef6b7704efee8531c78ceb79b7a0f8d1d
BLAKE2b-256 checksum
How to use checksums
083a91a48b6202b40e1b37ddbcb44de51a88d56a7e6638db3b48d91609b28b95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Security for tem-simulator-scripts 0.1.8.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page