docs: def initialize_res(residue):
      '''Creates a new structure containing a single amino acid. The type and
      geometry of the amino acid are determined by the argument, which has to be
      either a geometry object or a single-letter amino acid code.
      The amino acid will be placed into chain A of model 0.'''
      
      if isinstance( residue, Geo ):
          geo = residue
      else:
          geo=geometry(residue) 
      
      segID=1
      AA= geo.residue_name
      CA_N_length=geo.CA_N_length
      CA_C_length=geo.CA_C_length
      N_CA_C_angle=geo.N_CA_C_angle
      
      CA_coord= numpy.array([0.,0.,0.])
      C_coord= numpy.array([CA_C_length,0,0])
      N_coord = numpy.array([CA_N_length*math.cos(N_CA_C_angle*(math.pi/180.0)),CA_N_length*math.sin(N_CA_C_angle*(math.pi/180.0)),0])
  
      N= Atom("N", N_coord, 0.0 , 1.0, " "," N", 0, "N")
      CA=Atom("CA", CA_coord, 0.0 , 1.0, " "," CA", 0,"C")
      C= Atom("C", C_coord, 0.0, 1.0, " ", " C",0,"C")
  
      ##Create Carbonyl atom (to be moved later)
      C_O_length=geo.C_O_length
      CA_C_O_angle=geo.CA_C_O_angle
      N_CA_C_O_diangle=geo.N_CA_C_O_diangle
      
      carbonyl=calculateCoordinates(N, CA, C, C_O_length, CA_C_O_angle, N_CA_C_O_diangle)
      O= Atom("O",carbonyl , 0.0 , 1.0, " "," O", 0, "O")
  
      if(AA=='G'):
          res=makeGly(segID, N, CA, C, O, geo)
      elif(AA=='A'):
          res=makeAla(segID, N, CA, C, O, geo)
      elif(AA=='S'):
          res=makeSer(segID, N, CA, C, O, geo)
      elif(AA=='C'):
          res=makeCys(segID, N, CA, C, O, geo)
      elif(AA=='V'):
          res=makeVal(segID, N, CA, C, O, geo)
      elif(AA=='I'):
          res=makeIle(segID, N, CA, C, O, geo)
      elif(AA=='L'):
          res=makeLeu(segID, N, CA, C, O, geo)
      elif(AA=='T'):
          res=makeThr(segID, N, CA, C, O, geo)
      elif(AA=='R'):
          res=makeArg(segID, N, CA, C, O, geo)
      elif(AA=='K'):
          res=makeLys(segID, N, CA, C, O, geo)
      elif(AA=='D'):
          res=makeAsp(segID, N, CA, C, O, geo)
      elif(AA=='E'):
          res=makeGlu(segID, N, CA, C, O, geo)
      elif(AA=='N'):
          res=makeAsn(segID, N, CA, C, O, geo)
      elif(AA=='Q'):
          res=makeGln(segID, N, CA, C, O, geo)
      elif(AA=='M'):
          res=makeMet(segID, N, CA, C, O, geo)
      elif(AA=='H'):
          res=makeHis(segID, N, CA, C, O, geo)
      elif(AA=='P'):
          res=makePro(segID, N, CA, C, O, geo)
      elif(AA=='F'):
          res=makePhe(segID, N, CA, C, O, geo)
      elif(AA=='Y'):
          res=makeTyr(segID, N, CA, C, O, geo)
      elif(AA=='W'):
          res=makeTrp(segID, N, CA, C, O, geo)
      else:
          res=makeGly(segID, N, CA, C, O, geo)
  
      cha= Chain('A')
      cha.add(res)
      
      mod= Model(0)
      mod.add(cha)
  
      struc= Structure('X')
      struc.add(mod)
      return struc