Location>code7788 >text

Pivot of ligand movement trajectories using CyFES

Popularity:5 ℃/2024-08-20 09:40:05

Technical background

If we have a protein X and a ligand Y, then a long period of molecular dynamics simulations can be run on this X+Y system to observe the stability of this system under different binding sites. Similar to a previousblog (loanword)In the method of calculating contour surfaces, we can calculate the KDE function of the trajectory and then save it as a file in Cube format (a format used in Gaussian to save electron tracks). The protein and cube files can then be loaded for analysis by visualization software such as VMD.

Software Introduction and Installation

CyFESIt is a high-performance Python-based development of the user layer, Cython-based development of the link layer and CUDA C++ development of the physical layer Kernel functions.expand one's financial resourcesFES calculation software.

Currently the function is still relatively simple, only support three-dimensional molecular motion trajectory data perspective. Installation support source code and pip installation, pip installation method is as follows:

$ python3 -m pip install cyfes --user --upgrade -i /simple

The reason why it is recommended to take--userstrategy because many environments do not have permission to create files under the site-packages path, which can lead to problems with missing dynamic link libraries.--userThis problem can be circumvented to a certain extent. There will be some delay in synchronizing the domestic mirror sources when downloading, if you need to download the latest version of CyFES in time, you can use the-i /simpleParameter Configuration. After successful installation, you can use the following command to confirm that CyFES was installed successfully:

$ python3 -m cyfes --help
python3 -m cyfes --help
usage: __main__.py [-h] [-i I] [-ic IC] [-ib IB] [-s S] [-e E] [-g G] [-o O]
                   [-no_bias NO_BIAS] [-f32 F32] [-sigma SIGMA]

optional arguments:
  -h, --help        show this help message and exit
  -i I              Set the input record file path.
  -ic IC            Set the cv index of input record file. Default: 0,1,2
  -ib IB            Set the bias index of input record file. Default: 3
  -s S              CV length. Default: None
  -e E              Edge length. Default: 1.0
  -g G              Grid numbers. Default: 10,10,10
  -o O              Set the output FES file path.
  -no_bias NO_BIAS  Do not use the bias from input file. Default: false
  -f32 F32          Use float32. Default: false
  -sigma SIGMA      Sigma value when calculating FES. Default: 0.3

Of course, it's also possible to get a good idea of what to expect from theCyFES-Gitee homepageDownload the source code for source code installation. After the installation is complete, you can execute a python script to confirm if the dynamic link library is missing:

# check_dynamics.py
import os
import site
from pathlib import Path

site_path = Path(()[0])
site_file_path = site_path. / 'cyfes' / ''
site_dynamics_path = str(site_file_path)

user_site_path = Path(site.USER_SITE)
user_file_path = user_site_path. / 'cyfes' / ''
user_dynamics_path = str(user_file_path)

if not (site_dynamics_path) and not (user_dynamics_path):
    print ('Check dynamics complete, no  file founded!')
else:
    print ('Installation of CyFES success!')

After confirming that the installation was successful, we can start using CyFES for trajectory pivot.

Trajectory Input

CyFES supports reading a trace file like this onexyz_bias.txt

23.5578 33.8817 37.8341 0.000000
23.4752 33.7842 37.8489 0.882319
23.4557 33.7728 37.8236 1.544485
23.4979 33.6253 37.8524 1.952011
23.5502 33.6256 37.8981 2.140049
23.6389 33.6791 37.9141 1.437173
...

where the first three columns represent the x, y, and z coordinates of the trajectory, and the last column represents the bias potential bias of the corresponding coordinate position, which is used to calculate the weights. In versions after CyFES-2.6, it is possible to support that no bias is given, then the default is all 0.

CyFES Terminal Command

In the simplest scenario, we can perform a CyFES calculation using a simple line of code like this:

$ python3 -m cyfes -i xyz_bias.txt -o 

This generates a cube format file from the trajectory file that can be used for visualization. If some more configurations are needed, the common ones are:

$ python3 -m cyfes -i xyz_bias.txt -o  -e 5.0

Indicates that the edges add 5A (note here that the units are in angstroms, whereas the final saved cube format file will be converted to bohr bohr lengths) to the gaps.

$ python3 -m cyfes -i xyz_bias.txt -o  -g 20,30,40

Indicates that the number of grid points in the x, y, and z directions are 20, 30, and 40 grid points, respectively.

$ python3 -m cyfes -i xyz_bias.txt -o  -sigma 0.2

Indicates that the forbidden band width is set to 0.2. The style of the screen printout is roughly like this:

$ python3 -m cyfes -i xyz_bias.txt -e 5.0 -g 10,20,30 -sigma 0.1 -o z_x.cub
2024-08-19 09:34:26,304 [CyFES] Start to initialize parameters
2024-08-19 09:34:26,318 [CyFES] CV (1000, 3)
2024-08-19 09:34:26,318 [CyFES] Bias (1000,)
2024-08-19 09:34:26,319 [CyFES] Origin crd [16.0653 28.2584 32.4803]
2024-08-19 09:34:26,319 [CyFES] Final crd [29.4832 41.7948 47.3887]
2024-08-19 09:34:26,320 [CyFES] Grids (6000, 3)
2024-08-19 09:34:26,320 [CyFES] BandWidth [0.1 0.1 0.1]
2024-08-19 09:34:26,320 [CyFES] Start to calculate FES
2024-08-19 09:34:27,285 [CyFES] Writting FES into file /home/cy-fes/tests/z_x.cub
2024-08-19 09:34:27,306 [CyFES] Task complete :)

The main purpose here is to record some parameters and run logs, and the final calculation results will be output in the format of a Cube file to thez_x.cubfile, the file format can be consulted in the next section.

Cube Output

A brief description of the contents of the cube file format we generate here is roughly as follows:

Generated by CyFES
Total	1000000	grids
1	30.3589	53.4004	61.3785
100	0.256121	0	0
100	0	0.258383	0
100	0	0	0.284572
1	1.000000	43.1649	66.3195	75.6072
34.6304	34.1533	33.6897	33.2396	32.8028	32.3795	
31.9696	31.5731	31.19	30.8203	30.464	30.121	
29.7914	29.4751	29.1721	28.8823	28.6057	28.3422	
28.0918	27.8543	27.6297	27.4177	27.2182	27.031	
...

The first line is the title, the second line is the number of lattice points statement, the third line is the number of atoms and the coordinates of the origin, and the fourth through sixth lines are the number of lattice points and offset vectors in the x, y, and z directions. The seventh row is the atom information, here we put a hydrogen atom directly in the center of the trajectory box, the second column is the nuclear charge number and the next three columns are the coordinates. The eighth column starts with the potential energy values for each lattice point, with up to six lattice point data per row.

data visualization

In a previous post we covered the topic ofInstallation and use of VMD visualization softwareUsers can directly use VMD to do visualization of cub files and raw pdb files. But here is another tool to recommend that is free of installation and deployment:Online molstar platform, where you can load PDB format files and Cub format tracks directly like VMD:

You can choose the appropriate tool according to your own habits. This is a comparison of two effects, the first is the effect generated by VMD:

Then there is the effect generated by molstar:

That region obtained is a perspective view of the data of the molecular trajectory, which gives some measure of the relative magnitude of the regional free energy.

Summary outline

Molecular dynamics simulation is a time-for-space approach, so how to make a static presentation of the trajectory after leaving it on the time scale is exactly the problem solved by data pivoting.CyFES is an open-source, high-performance computational tool for data pivoting based on GPU hardware acceleration.We demonstrate the basic use of CyFES by taking an example of the trajectory of a protein-ligand interaction. We demonstrate the basic usage of CyFES through an example of protein-ligand interaction trajectory.

copyright statement

This article was first linked to:/dechinphy/p/

Author ID: DechinPhy

More original articles:/dechinphy/

Buy the blogger coffee:/dechinphy/gallery/image/