original_docstring: Adds a residue to chain A model 0 of the given structure, and
  	returns the new structure. The residue to be added is determined by
  	the geometry object given as second argument.
  	
  	This function is a helper function and should not normally be called
  	directly. Call add_residue() instead.
docstring: Adds a residue to chain A model 0 of the given structure, and
  returns the new structure. The residue to be added is determined by
  the geometry object given as second argument.
  
  This function is a helper function and should not normally be called
  directly.
docstring_tokens: Adds a residue to chain A model 0 of the given structure and returns the new structure . The residue to be added is determined by the geometry object given as second argument . This function is a helper function and should not normally be called directly .
code: def add_residue_from_geo(structure, geo):
  	'''Adds a residue to chain A model 0 of the given structure, and
  	returns the new structure. The residue to be added is determined by
  	the geometry object given as second argument.
  	
  	This function is a helper function and should not normally be called
  	directly. Call add_residue() instead.'''
  	resRef= getReferenceResidue(structure)
  	AA=geo.residue_name
  	segID= resRef.get_id()[1]
  	segID+=1
  	
  	##geometry to bring together residue
  	peptide_bond=geo.peptide_bond
  	CA_C_N_angle=geo.CA_C_N_angle
  	C_N_CA_angle=geo.C_N_CA_angle
  
  	##Backbone Coordinages
  	N_CA_C_angle=geo.N_CA_C_angle
  	CA_N_length=geo.CA_N_length
  	CA_C_length=geo.CA_C_length
  	phi= geo.phi
  	psi_im1=geo.psi_im1
  	omega=geo.omega
  
  	N_coord=calculateCoordinates(resRef['N'], resRef['CA'], resRef['C'], peptide_bond, CA_C_N_angle, psi_im1)
  	N= Atom("N", N_coord, 0.0 , 1.0, " "," N", 0, "N")
  
  	CA_coord=calculateCoordinates(resRef['CA'], resRef['C'], N, CA_N_length, C_N_CA_angle, omega)
  	CA=Atom("CA", CA_coord, 0.0 , 1.0, " "," CA", 0,"C")
  
  	C_coord=calculateCoordinates(resRef['C'], N, CA, CA_C_length, N_CA_C_angle, phi)
  	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)
  	elif(AA=='SAR'):
  		res=makeSar(segID, N, CA, C, O, geo)
  	else:
  		res=makeGly(segID, N, CA, C, O, geo)
  		
  	resRef['O'].set_coord(calculateCoordinates(res['N'], resRef['CA'], resRef['C'], C_O_length, CA_C_O_angle, 180.0))
  
  	ghost= Atom("N", calculateCoordinates(res['N'], res['CA'], res['C'], peptide_bond, CA_C_N_angle, psi_im1), 0.0 , 0.0, " ","N", 0, "N")
  	res['O'].set_coord(calculateCoordinates( res['N'], res['CA'], res['C'], C_O_length, CA_C_O_angle, 180.0))
  
  	structure[0]['A'].add(res)
  	return structure
code_tokens: def add_residue_from_geo ( structure , geo ) : resRef = getReferenceResidue ( structure ) AA = geo . residue_name segID = resRef . get_id ( ) [ 1 ] segID += 1 peptide_bond = geo . peptide_bond CA_C_N_angle = geo . CA_C_N_angle C_N_CA_angle = geo . C_N_CA_angle N_CA_C_angle = geo . N_CA_C_angle CA_N_length = geo . CA_N_length CA_C_length = geo . CA_C_length phi = geo . phi psi_im1 = geo . psi_im1 omega = geo . omega N_coord = calculateCoordinates ( resRef [ 'N' ] , resRef [ 'CA' ] , resRef [ 'C' ] , peptide_bond , CA_C_N_angle , psi_im1 ) N = Atom ( "N" , N_coord , 0.0 , 1.0 , " " , " N" , 0 , "N" ) CA_coord = calculateCoordinates ( resRef [ 'CA' ] , resRef [ 'C' ] , N , CA_N_length , C_N_CA_angle , omega ) CA = Atom ( "CA" , CA_coord , 0.0 , 1.0 , " " , " CA" , 0 , "C" ) C_coord = calculateCoordinates ( resRef [ 'C' ] , N , CA , CA_C_length , N_CA_C_angle , phi ) C = Atom ( "C" , C_coord , 0.0 , 1.0 , " " , " C" , 0 , "C" ) 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 ) elif ( AA == 'SAR' ) : res = makeSar ( segID , N , CA , C , O , geo ) else : res = makeGly ( segID , N , CA , C , O , geo ) resRef [ 'O' ] . set_coord ( calculateCoordinates ( res [ 'N' ] , resRef [ 'CA' ] , resRef [ 'C' ] , C_O_length , CA_C_O_angle , 180.0 ) ) ghost = Atom ( "N" , calculateCoordinates ( res [ 'N' ] , res [ 'CA' ] , res [ 'C' ] , peptide_bond , CA_C_N_angle , psi_im1 ) , 0.0 , 0.0 , " " , "N" , 0 , "N" ) res [ 'O' ] . set_coord ( calculateCoordinates ( res [ 'N' ] , res [ 'CA' ] , res [ 'C' ] , C_O_length , CA_C_O_angle , 180.0 ) ) structure [ 0 ] [ 'A' ] . add ( res ) return structure
short_docstring: Adds a residue to chain A model 0 of the given structure, and
  returns the new structure.
short_docstring_tokens: Adds a residue to chain A model 0 of the given structure and returns the new structure .
comment: '''Adds a residue to chain A model 0 of the given structure, and
  	returns the new structure. The residue to be added is determined by
  	the geometry object given as second argument.
  	
  	This function is a helper function and should not normally be called
  	directly. Call add_residue() instead.'''$SEP$##geometry to bring together residue$SEP$##Backbone Coordinages$SEP$##Create Carbonyl atom (to be moved later)