Skip to content

Adrien-Berard/SPombe_MatRegion_Model

Repository files navigation

PombeMatRegionModel

Keywords : Reactive Molecular Dynamics, LAMMPS, Python, Epigenetics, Polymer, Fission yeast

This code is being created and updated by Adrien Berard. This README is NOT finished.

Table of contents

  1. Introduction
  2. Unidimensional modelisation of the chromatin of the Mat Region within fission yeast (Python)
    1. Installation of Python
      1. macOS
      2. Linux
      3. Windows
    2. Use of the Python codes
  3. Three dimensional modelisation of the chromatin of the Mat Region within fission yeast (LAMMPS)
    1. LAMMPS Installation
      1. Linux
      2. MacOS
      3. Windows
    2. Build LAMMPS using CMake with the modified version by Jacob Gissinger
    3. Use of the code
      1. How to run a LAMMPS simulation
      2. Explanation of the files
        1. input.lammps
        2. etc
  4. Visualisation using VMD or Ovito
    1. VMD & Topotools
    2. Ovito
  5. Copolymer reactive model

Introduction

  • Start the introduction
  • Explain the visualisation softwares
  • Explain the codes used
  • Finish the README.md 🎉

This README provides an overview of the PombeMatRegionModel, a code designed for conducting reactive molecular dynamics simulations of chromatin, specifically focusing on the Mat Region within fission yeast. The code is developed and maintained by Adrien Berard.

Chromatin, the complex of DNA and proteins that makes up chromosomes, plays a crucial role in regulating gene expression and other cellular processes. Understanding its dynamic behavior is essential in fields such as epigenetics and molecular biology. The PombeMatRegionModel facilitates the study of chromatin dynamics through reactive molecular dynamics simulations.

Unidimensional Modelisation of Chromatin (Python)

The Python component of the code provides a unidimensional model of chromatin, allowing users to simulate the behavior of chromatin within the Mat Region using Python scripts. Installation instructions for Python are provided for macOS, Linux, and Windows operating systems. Once installed, users can utilize Python scripts to model chromatin dynamics.

Three-Dimensional Modelisation of Chromatin (LAMMPS)

For a more detailed and comprehensive simulation, the code offers a three-dimensional model of chromatin using LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator). This section guides users through the installation of LAMMPS on Unix-based and Windows systems. Additionally, instructions are provided for building LAMMPS using CMake with a modified version, enhancing its capabilities for chromatin modeling.

Visualization Using VMD or Ovito

Visualizing the simulated chromatin structures is crucial for analyzing and interpreting simulation results. This section introduces two popular visualization tools, VMD (Visual Molecular Dynamics) and Ovito, and provides instructions for visualizing chromatin structures generated by the PombeMatRegionModel simulations.

Copolymer Reactive Monomers Model

While the primary focus of the code is on modeling chromatin dynamics within fission yeast, it can also be adapted for other polymer systems. This section discusses the possibility of using the code to model bistable states between monomers of different polymers and provides guidance on how to modify the code for alternative purposes.

By providing detailed instructions for installation, usage, and visualization, the PombeMatRegionModel empowers researchers to explore the dynamic behavior of chromatin and related polymer systems, contributing to advances in epigenetics, molecular biology, and beyond.

Unidimensional modelisation of the chromatin of the Mat Region within fission yeast (Python)

Installation of Python

macOS

Open your command terminal and type:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install python3

If needed press "Y" for yes to download firstly homebrew and then the last verion of python 3.

Linux

Python3 should already be installed on your machine.

Windows

Install python https://www.python.org/downloads/ and press the Download button to have the latest version.

Note

To verify that you've installed Python successfully on your machine, run one of the following commands (depending on your operating system):

Linux/macOS: open a Terminal Window and type the following command:

python3 --version

Windows: open a command prompt and run the following command:

py -3 --version

If the installation was successful, the output window should show the version of Python that you installed.

Use of the Python codes

To be continued...

Three dimensional modelisation of the chromatin of the Mat Region within fission yeast (LAMMPS)

Note

Pass to Use of the code to run the simulation and understand each files if you already have LAMMPS built with the modified version.

LAMMPS installation

To have any information, visit the following website: https://docs.lammps.org/Manual.html.

Otherwise follow this short tutorial inspired by the LAMMPS documentation. We will build LAMMPS using CMake. For information, it is always better to use Unix for LAMMPS (Linux or macOS) but one can use Windows.

Linux

First let's check if CMake is installed. Open your terminal console and copy-paste this code:

which cmake             # do you have it?
which cmake3            # version 3 may have this name
cmake --version         # what specific version you have

if you have clusters or supercomputers:

module list            # is a module for cmake already loaded?
module avail           # is a module for cmake available?
module load cmake      # load cmake module with appropriate name

If you do not have CMake, you should install the latest version following this link: https://cmake.org/download/ or using sudo (better option). We install also a lot of other mandatory libraries for LAMMPS.

sudo apt update
sudo apt upgrade -y
sudo apt install -y cmake build-essential ccache gfortran openmpi-bin libopenmpi-dev \
                    libfftw3-dev libjpeg-dev libpng-dev python3-dev python3-pip \
                    python3-virtualenv libblas-dev liblapack-dev libhdf5-serial-dev \
                    hdf5-tools

Since you now have CMake, we can get the files of LAMMPS from GitHub. If you don't know about GitHub, check https://github.com/.

cd /users/your_username/folder_where_lammps_should_be_installed              # Change your username and your folder name according to what you'd like.           
git clone -b release https://github.com/lammps/lammps.git modified_lammps

This command will get you the latest version of LAMMPS on a new binary in the folder modified_lammps. Usually a later version than the one used in this repository should be ok. If you want to keep you LAMMPS version up to date here is why you should type in you terminal :

cd modified_lammps               # Go to the directory where LAMMPS is installed
git checkout release      # not needed if you always stay in this branch
git checkout stable       # use one of these 4 checkout commands
git checkout develop      # to choose the branch to follow
git checkout maintenance
git pull

MacOS

First let's check if CMake is installed. Open your terminal console and copy-paste this code:

which cmake             # do you have it?
which cmake3            # version 3 may have this name
cmake --version         # what specific version you have

Then let us get homebrew because you may not have cmake or python or other packages installed :

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then let install all the packages needed like python, cmake and C and fortran compilers :

brew update    # Update homebrew
brew upgrade    # Upgrade installed packages
brew install cmake ccache gcc openmpi fftw jpeg libpng python3 openblas lapack hdf5     # Install packages   

Since you now have CMake, we can get the files of LAMMPS from GitHub. If you don't know about GitHub, check https://github.com/.

cd /users/your_username/folder_where_lammps_should_be_installed              # Change your username and your folder name according to what you'd like.           
git clone -b release https://github.com/lammps/lammps.git modified_lammps

This command will get you the latest version of LAMMPS on a new binary in the folder modified_lammps. Usually a later version than the one used in this repository should be ok. If you want to keep you LAMMPS version up to date here is why you should type in you terminal :

cd modified_lammps               # Go to the directory where LAMMPS is installed
git checkout release      # not needed if you always stay in this branch
git checkout stable       # use one of these 4 checkout commands
git checkout develop      # to choose the branch to follow
git checkout maintenance
git pull

Windows

Windows is a bit different so follow this nice tutorial written on the LAMMPS documentation https://docs.lammps.org/Howto_wsl.html. When you need to choose between Option 1 and 2, choose option 2. You will now have python3 installed and a lot of useful packages for a Unix virtual machine.

Warning

STOP the tutorial from https://docs.lammps.org/Howto_wsl.html at : mkdir build; cd build

Build LAMMPS using CMake with the modified version by Jacob Gissinger

Now that you have all the usual files for LAMMPS, let's modify its version so we can have the packages that we want.

mkdir build     
cd build    

Let us now install the packages :

cmake -C ../cmake/presets/most.cmake -C ../cmake/presets/nolib.cmake ../cmake # If there is an error message, add the current folder path at the end : /home/username/modified_lammps/build 

If you don't have much space or are minimalist, you can only install the necessary packages with those command lines:

cmake -D PKG_MOLECULE=yes -D PKG_REACTER=yes  # If there is an error message, add the current folder path at the end : /home/username/modified_lammps/build

Once you have done that, you should have access to the files of the fix bond/react source code.

Download the REACTER_Gissinger_For_Berard_Thon_version folder. Drag and drop the two files within this folder with the two ones with the same name within users/folderLAMMPS/modified_lammps/src/REACTION.

If you want to use the terminal of command, do the following :

cd                                          
cd modified_lammps/src/REACTION                        # go to the REACTION package folder
rm fix_bond_react.cpp                        # remove with rm the old files
rm fix_bond_react.h
wget https://raw.githubusercontent.com/Adrien-Berard/SPombe_MatRegion_Model/main/REACTER_Gissinger_For_Berard_Thon_version/fix_bond_react.cpp                        # get the new files with wget from github
wget https://raw.githubusercontent.com/Adrien-Berard/SPombe_MatRegion_Model/main/REACTER_Gissinger_For_Berard_Thon_version/fix_bond_react.h
cd                        # come back to the beginning 
cd modified_lammps/build                        # go to the lammps/build folder
make -j n                        # n being the number of processors you have    
cmake ../cmake           # configuration reading CMake scripts from ../cmake
cmake --build .          # compilation (or type "make")   
export PATH=/home/your_username/modified_lammps/build:$PATH.          # Change your_username with your username so you have lammps on your path

It will take a little bit of time but do not worry.

If you do not have any errors during the process then you got the modified version of LAMMPS, good job ! Otherwise, copy paste one line at a time and check where the problem is. Do not hesitate to search on LAMMPS documentation or ask a question on the Discussion section.

To verify that LAMMPS is installed type the following:

lmp 

The version should be LAMMPS (17 Apr 2024) or an earlier version. To quit press [Ctrl + C].

Let now do a last check to see which packages have been installed :

cd 
lmp -h > out.txt
code out.txt

Scroll down in the text file and check for "Installed packages". If you have MOLECULE and REACTION and/or more, then it is fine, otherwise their might have been a problem.

Use of the code

How to run a LAMMPS simulation

To proceed, let us now use the code. Go to your Unix command terminal - clicking on the Ubuntu app if you did the tutorial on Windows. Do the following:

cd
cd /home/users/username/working_folder           # use the working_folder name that you like
git clone https://github.com/Adrien-Berard/SPombe_MatRegion_Model.git

Then let's go to the Replication file to learn how to launch the simulation. While it runs, you can read the following paragraphs. But first run it with:

cd /SPombe_MatRegion_Model/3DModel/Morse/Replication
mpirun -np 10 lmp -in input.lammps           # 10 if you have 10 processors to build LAMMPS, use n processors n >= 1 otherwise          

If this works you should have lines that are printed on your terminal every few seconds.

Explanation of the files

input.lammps

To be continued...

etc

To be continued...

Visualisation using VMD or Ovito

The easiest way to bring your chromatin to life is by using a tool to visualize it. The two most common tools are VMD and Ovito.

VMD & Topotools

Download the last VMD version (it includes the package TopoTools) on this website based on your OS: https://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD. It should be more than 1.9.3. Then follow the instructions for installation based on your OS. When opening VMD, it should open 3 windows.

Go on the white one (VMD main) -> File -> NewMolecule -> Browse -> users/username/workingfolder/SPombe_MatRegion_Model/3DModel/Morse/Replication -> dump.lammpstrj. You should now visualize a weird form with a lot of links: let's change that.

To do so go to Graphics -> Representations -> Coloring Method -> Type and then Drawing Method -> VDW.

You can now see your nucleosomes as spherical atoms.

Let's now see the bonds. Go to Extensions -> Tk console

Ovito

To be continued...

Copolymer reactive monomers model

Even though the model was intended to model epigenetics within fission yeast based on IB Dodd et al.1, one can use the code to model a bistable state between monomers of another polymer of interest. To do so, I let you see the sections in 1D using python and in 3D using LAMMPS to model this kind of system. The code can be updated or demand can be transfer to the code creator for different purposes.

Footnotes

  1. Dodd, I. B., Micheelsen, M. A., Sneppen, K., & Thon, G. (2007). Theoretical analysis of epigenetic cell memory by nucleosome modification. Cell, 129(4), 813–822.DOI:doi.org/10.1016/j.cell.2007.02.0533

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks