You can run profiling tools to determine what operations take time while running executables within the container. Some profiling tools must be executed on the host as they use tight integrations with the Linux kernel.
nvprof with the option
$ nvprof --profile-child-processes singularity exec --nv software.sif python3 lj.py
On platforms where you need to launch HOOMD with MPI, call
$ mpirun -n 1 nvprof --profile-child-processes \
singularity exec --nv software.sif.sif python3 lj.py
You may need to add the
--openacc-profiling off on some systems.
Build HOOMD from source to profile it on the CPU. The CPU profiler perf does not interoperate with Singularity containers.