Giter Club home page Giter Club logo

Comments (9)

nezix avatar nezix commented on August 18, 2024

A few questions:

  • Did you change the smoothing parameter to use Laplacian smoothing ? This is the "l" parameter.
  • Did you change the voxel size, you can improve the quality of the mesh by setting it to something lower.
  • How do you visualize the results ? It looks like the normals are not used.

from quickses.

miemiemmmm avatar miemiemmmm commented on August 18, 2024

Thanks for your reply. I tried with a higher number of Laplacian smoothing, increased the slice size, and lowered the voxel size, the surface spike problem was reduced. However, the surface is still not water-tight.

The tool I used for visualization is Open3D. Basically, I just outputted the vertices and faces to the object file and the normal is from open3d's computation before rendering.

The surface you are viewing is the atoms within a cubic bounding box from part of a protein. As you might see atoms outside of the surface, they are atoms outside of the bounding box.
image

from quickses.

nezix avatar nezix commented on August 18, 2024

Slice size shouldn't matter as your surface seems rather small. If your GPU has enough memory to compute the whole surface in one run, you can ignore this setting.

I can increase the limit of the grid to see if that solves your issue.

from quickses.

nezix avatar nezix commented on August 18, 2024

Could you try this branch and see if that fixes your issue ?

from quickses.

miemiemmmm avatar miemiemmmm commented on August 18, 2024

There is still the problem in the fix-origin branch. I am using RTX4090 with 24GB memory. GPU hardware should not be the problem.

Could it be a Cuda version or nvcc problem? When I compile the program, there are some errors about missing functions. I have to add the following code to CudaSurf.cu to enable the compilation.

#include <thrust/sort.h>
#include <thrust/unique.h>
#include <thrust/count.h>
Error message: 
nvcc -c -o CudaSurf.o CudaSurf.cu -Icpdb/ -use_fast_math -O3
CudaSurf.cu(419): error: namespace "thrust" has no member "sort"
      thrust::sort(vertThrust, vertThrust + totalVerts, sort_float3());
              ^

CudaSurf.cu(421): error: namespace "thrust" has no member "unique"
      thrust::device_ptr<float3> last = thrust::unique(vertThrust, vertThrust + totalVerts, samefloat3());
                                                ^

CudaSurf.cu(567): error: namespace "thrust" has no member "sort"
      thrust::sort(D_beg, D_beg + N, cmp);
              ^

CudaSurf.cu(646): error: namespace "thrust" has no member "sort"
                  thrust::sort(fillThrust, fillThrust + sliceNbCellSES);
                          ^

CudaSurf.cu(648): error: namespace "thrust" has no member "count_if"
                  unsigned int notEmptyCells = thrust::count_if(thrust::device, fillThrust, fillThrust + sliceNbCellSES, is_notempty());
                                                       ^

CudaSurf.cu(648): error: namespace "thrust" has no member "device"
                  unsigned int notEmptyCells = thrust::count_if(thrust::device, fillThrust, fillThrust + sliceNbCellSES, is_notempty());
                                                                        ^

6 errors detected in the compilation of "CudaSurf.cu".
make: *** [Makefile:21: CudaSurf.o] Error 2
My Cuda info: 
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.98                 Driver Version: 535.98       CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 4090        Off | 00000000:01:00.0  On |                  Off |
|  0%   38C    P8              17W / 450W |   1929MiB / 24564MiB |      4%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

from quickses.

miemiemmmm avatar miemiemmmm commented on August 18, 2024

Could it be the case that there is no enough shifting of the voxels which causes the truncation of the surface?
There is also some implicit problem with some specific values of grid spacing.

./QuickSES -i 4bso.pdb -o 4bso.obj -v 0.24
image

Look like a truncation
./QuickSES -i 4bso.pdb -o 4bso.obj -v 0.22

image

With spacing at 0.2 everything looks fine. 
./QuickSES -i 4bso.pdb -o 4bso.obj -v 0.20

from quickses.

nezix avatar nezix commented on August 18, 2024

I need a bit of time to work on this. Thanks for your report

from quickses.

nezix avatar nezix commented on August 18, 2024

I fixed the compilation errors on recent CUDA versions.
Also, I investigated the issue with some values of the voxel size, the problem comes from the step after the Marching Cubes algorithm, welding vertices.
I am currently trying to fix it

from quickses.

nezix avatar nezix commented on August 18, 2024

I fixed the issue with welding vertices that caused holes and weird artefacts in the mesh for some values of voxel size.
I didn't manage to reproduce the truncation issue on my machine though

from quickses.

Related Issues (3)

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.