I want to model missing loop in a protein, when I use loopmodel method do it, I got the perturbation of whole protein structure , my code is below, could you help me solve this problem?

a = loopmodel(env,
              alnfile  = 'alignment.ali',     # alignment filename
              knowns   = '5fd1',              # codes of the templates
              sequence = 'xxx')              # code of the target
a.starting_model= 1                 # index of the first model
a.ending_model  = 1                 # index of the last model
                                    # (determines how many models to calculate)
a.md_level = None                   # No refinement of model

a.loop.starting_model = 1           # First loop model
a.loop.ending_model   = 1           # Last loop model
a.loop.md_level       = refine.fast # Loop model refinement level

a.make()                            # do homology modeling

Qiang Zhong
Institute of Biophysics, Chinese Academy of Sciences