Closed TheAutoMan1ac closed 10 months ago
My educated guess is that you are running on the GPU? Because the bit you edited is for CPU simulations.
Yes it is running on GPU. So I guess I have to make the changes in another file?
Yes. All the CUDA stuff is in the src/CUDA
folder. In particular, external forces are evaluated in src/CUDA/Backends/CUDA_MD.cuh
, in the set_external_forces
kernel. Look for the CUDA_REPULSIVE_SPHERE
case.
Thanks for the quick help. After changing it at the correct location it works like a charm.
I am right now trying to change the RepulsiveSphere.cpp file to change the behaviour of the repulsive sphere from keeping elements inside the sphere to keeping them outside.
I just changed the value and potential function to
and recompiled oxDNA completely. However, it seems that the repulsiveSphere potential behaves exactly as before (I see elements dragged into the sphere).
I don't think this is a bug but rather me not finding the right code location to change the potential behaviour. Can you tell me if my approach of modifying the potential this way is principally correct?
Best Markus