GithubHelp home page GithubHelp logo

Comments (13)

dkoes avatar dkoes commented on August 11, 2024

I'll have to figure out why this isn't showing up in the online documentation, but there are writers (and readers) for dx files. See molgrid.write_dx_grids and molgrid.write_dx. You can then use your favorite molecular visualization tool (e.g. PyMOL, VMD) to view the dx files.

from libmolgrid.

yangxiufengsia avatar yangxiufengsia commented on August 11, 2024

Thank you Prof. koes. I will try then.

from libmolgrid.

yangxiufengsia avatar yangxiufengsia commented on August 11, 2024

Hi prof.koes

I tried molgrid.write_dx_grids() function, but it didn't work with error messages.
I found the function is defined as follows:
write_dx_grids(prefix, data.get_type_names(), grid, batch_info[0].grid_center, gmaker.get_resolution(), scale);

I used in this way: molgrid.write_dx_grids('withdx/lklkl.dx', test_e.get_type_names(), grid , lig_struct.center,
grid_maker.get_resolution())
errors:
Boost.Python.ArgumentError: Python argument types in
molgrid.molgrid.write_dx_grids(str, StringVec, AtomGrid)
did not match C++ signature:
write_dx_grids(std::string prefix, std::vector<std::string, std::allocatorstd::string > type_names, libmolgrid::Grid<float, 4ul, false> grid, float3 center, float resolution, float scale=1.0)

could you give me an example of the above parameters used in this defined functio?
especially, I don't understand the the second parameter: data.get_types_names(), is it obtained from example_provider?

Thanks a lot!

from libmolgrid.

dkoes avatar dkoes commented on August 11, 2024

what is the type of grid? It is reporting as AtomGrid which isn't something in libmolgrid. It needs to be of type molgrid.Grid4f.

from libmolgrid.

yangxiufengsia avatar yangxiufengsia commented on August 11, 2024

I used this type of grid:
grid = AtomGrid(
values=np.array(grid_data),
channels=grid_channels,
center=lig_struct.center,
resolution=grid_maker.get_resolution(),)

Is this wrong right? I still did not get the meaning of the parameters in write_dx_grids function.
I also have several other questions.

  1. what is molgrid.Grid4f?
  2. I know, libmolgrid can automatically calculate the center of the binding pocket by lig_struct.center.
    but what if i don't input ligand, how libmolgrid calculate the center of binding pocket?
    I am new beginner, sorry for lots of very simple questions.

from libmolgrid.

dkoes avatar dkoes commented on August 11, 2024

What is AtomGrid? It is not part of molgrid, so one generally would not expect passing it to a molgrid function to work. A Grid4f is a 4D grid.

You can provide the center of the grid. If you are using a function that calculates the center for you, it will take the center of the last molecule specified.

from libmolgrid.

yangxiufengsia avatar yangxiufengsia commented on August 11, 2024

Prof. Koes , Thank you for helping solve my questions. I used AtomGrid defined in your liGAN repos, and will check more details of the source code.

from libmolgrid.

dkoes avatar dkoes commented on August 11, 2024

If it is AtomGrid from the liGAN repository use its to_dx method.

from libmolgrid.

yangxiufengsia avatar yangxiufengsia commented on August 11, 2024

Thank you prof. koes. i have found it from liGAN repository.

from libmolgrid.

yangxiufengsia avatar yangxiufengsia commented on August 11, 2024

Hi prof.Koes,

  • I tried to_dx() function in liGAN repos and obtained the .dx files. Then I used pymol to visualize the generated .dx files. But I got very strange 3d grid density (white and back colored only, shown in the attached image), is this correct?

スクリーンショット 2021-03-10 172429

  • How did you obtain the following visualization figure in your 3d-cnn binding pose prediction paper:

スクリーンショット 2021-03-10 170356

  • Are there any specific reasons to define the grid density using the following formula in your paper?

スクリーンショット 2021-03-11 152019

Looking forward to your reply. Thank you.

from libmolgrid.

dkoes avatar dkoes commented on August 11, 2024

That figure is using VMD and showing multiple levels of isosurfaces (which you can do in pymol as well). Some resources:
https://pymolwiki.org/index.php/Isosurface
https://pymolwiki.org/index.php/Volume

The density function was chosen to be a Gaussian that smoothly goes to exactly zero at 1.5 the radius.

from libmolgrid.

yangxiufengsia avatar yangxiufengsia commented on August 11, 2024

thanks a lot prof. koes. I have another question regarding one of your recent paper: deepfrag (https://www.biorxiv.org/content/10.1101/2021.01.07.425790v1).
How to modify the grid density definition A(d,r) to other definitions similar with voxelization methods described in section 3.2.2 in your above paper?
It is needed to redefine from your libmolgrid source code? Looking forward to your reply. sorry for so many questions.

from libmolgrid.

dkoes avatar dkoes commented on August 11, 2024

Harrison didn't use libmolgrid, he wrote is own gridding code. libmolgrid supports Gaussian+quadratic, truncated Gaussian, and boolean gridding.

from libmolgrid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.