Skip to content

mevol/python_topaz3

Repository files navigation

LGTM alerts Language grade: Python Black Code Style Documentation Status Python 3.6

Topaz3

A data manipulation and machine learning package for Macromolecular Crystallography (MX) at Diamond Light Source.

Specifically, it transforms electron density map data obtained from diffraction experiments and uses machine learning to estimate whether the original or inverse hand has clearer information.

Read the documentation about how it works at: https://python-topaz3.readthedocs.io/en/latest/

Prerequisites

To use the machine learning side of Topaz3, tensorflow-gpu is required. This speeds up the training and use of neural networks. However, there are some restrictions regarding what version of tensorflow-gpu can be used, depending on the version of CUDA supported by the GPU. Use the table on this page to make sure that the setup you plan to run on is installed correctly.

Topaz3 was developed and tested with tensorflow-gpu 1.12.0 and CUDA 9.

Installation

Clone the repository from the source code on Github:

git clone https://github.com/DiamondLightSource/python-topaz3.git

It is good practice to create a virtual environment for development:

python3 -m venv topaz3_venv

Now activate the venv. This is the only step to repeat after installation.

source topaz3_venv/bin/activate

Note: topaz3_venv/bin/activate is a file so can be accessed the same way as any other file (via absolute or relative path)

Install an editable version of the package:

# Make sure to point this to the top level of the package
pip install -e topaz3

Development

This will install the dependencies required to use Topaz3. If you want to develop and contribute, follow these steps:

  • Go to the top level of the package:
    cd topaz3    
  • Install all necessary packages from requirements.txt
    pip install -r requirements.txt
  • Install precommit hooks which will help keep the code maintainable:
    pre-commit install

Contributing

Changes to this project should use pre-commit with flake8 and black checks

Install the pre-commit hooks with:

pre-commit install

Authors

This repository was developed at Diamond Light Source

  • Lead Developer: Tim Guite
  • Supervisor: Melanie Vollmar

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages