Download model/CombinatorialAssembler/libs_DockingLib/DotSphere.cc from OneScience-Group/CombFold: direct link, hf CLI and curl.
- Browser
- Download file 598 Bytes
-
https://huggingface.co/OneScience-Group/CombFold/resolve/main/model/CombinatorialAssembler/libs_DockingLib/DotSphere.cc
- Command line
-
hf download hf://OneScience-Group/CombFold/model/CombinatorialAssembler/libs_DockingLib/DotSphere.cc
-
curl -L -o DotSphere.cc https://huggingface.co/OneScience-Group/CombFold/resolve/main/model/CombinatorialAssembler/libs_DockingLib/DotSphere.cc
598 Bytes
| int DotSphere::createSphereDots(float radius, float density) { | |
| float num_equat = 2*pi*radius*sqrt(density); | |
| float vert_count = 0.5*num_equat; | |
| for(int i=0; i<vert_count; i++) { | |
| float phi = (pi*i)/vert_count; | |
| float z = cos(phi); | |
| float xy = sin(phi); | |
| float horz_count = xy*num_equat; | |
| for(int j=0; j<horz_count-1; j++) { | |
| float teta = (2*pi*j)/horz_count; | |
| float x = xy*cos(teta); | |
| float y = xy*sin(teta); | |
| push_back(Vector3(radius*x,radius*y,radius*z)); | |
| } | |
| } | |
| return size(); | |
| } | |