  We propose a novel combinatorial algorithm for efficient generation of
Hamiltonian walks and cycles on a cubic lattice, modeling the conformations of
lattice toy proteins. Through extensive tests on small lattices (allowing
complete enumeration of Hamiltonian paths), we establish that the new
algorithm, although not perfect, is a significant improvement over the earlier
approach by Ramakrishnan et. al., as it generates the sample of conformations
with dramatically reduced statistical bias. Using this method, we examine the
fractal properties of typical compact conformations. In accordance with Flory
theorem celebrated in polymer physics, chain pieces are found to follow
Gaussian statistics on the scale smaller than the globule size. Cross-over to
this Gaussian regime is found to happen at the scales which are numerically
somewhat larger than previously believed. We further used Alexander and
Vassiliev degrees 2 and 3 topological invariants to identify the trivial knots
among the Hamiltonian loops. We found that the probability of being knotted
increases with loop length much faster than it was previously thought, and that
chain pieces are consistently more compact than Gaussian if the global loop
topology is that of a trivial knot.
