revised for open boundary condition
changed indents for fragments.py, geometry.py and ham.py