3d-dart/server/plugins/BuildNucleicAcids.py
def FiberModule(sequence, repeat, natype, name):
	
	"""Make nucleic acid structures from using on of the 55 available fiber structures"""
	
	try:
		x = int(natype)
		if x in range(1,56): option = "-"+str(x)
		else:
			print "    * WARNING:", natype, "is no valid nucleic acid option, set to default BDNA"
			option = -4
	except:
		if natype == 'ADNA': option = -1
		elif natype == 'BDNA': option = -4
		elif natype == 'CDNA': option = -47
		else:	
			print "    * WARNING:", natype, "is no valid nucleic acid option, set to default BDNA"
			option = -4
		
	cmd = "fiber " + str(option)+" " + (name)+".pdb"" << _End_ \n 2 \n %s \n %d \n _End_\n" % (sequence, repeat)
	os.system(cmd)
Make nucleic acid structures from using on of the 55 available fiber structures
Make nucleic acid structures from using on of the 55 available fiber structures
Make nucleic acid structures from using on of the 55 available fiber structures
def FiberModule(sequence, repeat, natype, name):
	try:
		x = int(natype)
		if x in range(1,56): option = "-"+str(x)
		else:
			print "    * WARNING:", natype, "is no valid nucleic acid option, set to default BDNA"
			option = -4
	except:
		if natype == 'ADNA': option = -1
		elif natype == 'BDNA': option = -4
		elif natype == 'CDNA': option = -47
		else:	
			print "    * WARNING:", natype, "is no valid nucleic acid option, set to default BDNA"
			option = -4
	cmd = "fiber " + str(option)+" " + (name)+".pdb"" << _End_ \n 2 \n %s \n %d \n _End_\n" % (sequence, repeat)
	os.system(cmd)
def FiberModule ( sequence , repeat , natype , name ) : try : x = int ( natype ) if x in range ( 1 , 56 ) : option = "-" + str ( x ) else : print "    * WARNING:" , natype , "is no valid nucleic acid option, set to default BDNA" option = - 4 except : if natype == 'ADNA' : option = - 1 elif natype == 'BDNA' : option = - 4 elif natype == 'CDNA' : option = - 47 else : print "    * WARNING:" , natype , "is no valid nucleic acid option, set to default BDNA" option = - 4 cmd = "fiber " + str ( option ) + " " + ( name ) + ".pdb" " << _End_ \n 2 \n %s \n %d \n _End_\n" % ( sequence , repeat ) os . system ( cmd )
Make nucleic acid structures from using on of the 55 available fiber structures
Make nucleic acid structures from using on of the 55 available fiber structures
"""Make nucleic acid structures from using on of the 55 available fiber structures"""
sequence
repeat
natype
name