Method for estimating the entropy of macromolecules with computer simulation. Chains with excluded volume