Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

#@title STEP 3 Run druggpt #@markdown # **Instructions** #@markdown - If you select "p..

Decoded Output download

<?  #@title STEP 3 Run druggpt 
 
#@markdown # **Instructions** 
#@markdown - If you select "protein amino acid sequence", input a protein amino acid sequence in the input_protein_amino_acid_sequence field. 
#@markdown - If you select "fasta file", first upload the fasta file to the druggpt directory by dragging and dropping it into the file browser on the left side. Then, input the name of the fasta file as text in the input_fasta_file field. 
#@markdown - If "no input" is selected, the input content will be ignored. 
 
#@markdown #step 3.1 Select your input type 
Input_type = "fasta file" #@param ["protein amino acid sequence", "fasta file", "no input"] 
#@markdown #step 3.2 Provide the required input based on your selected input type: 
 
#@markdown - For "protein amino acid sequence", input a protein amino acid sequence. 
input_protein_amino_acid_sequence = "MAKQPSDVSSECDREGRQLQPAERPPQLRPGAPTSLQTEPQGNPEGNHGGEGDSCPHGSPQGPLAPPASPGPFATRSPLFIFMRRSSLLSRSSSGYFSFDTDRSPAPMSCDKSTQTPSPPCQAFNHYLSAMASMRQAEPADMRPEIWIAQELRRIGDEFNAYYARRVFLNNYQAAEDHPRMVILRLLRYIVRLVWRMH" #@param {type:"raw"} 
#@markdown - Upload the fasta file to the "druggpt" directory by selecting the file and uploading it. Ensure that the file is placed within the same folder as the default "bcl2.fasta" file. Then, input the name of the fasta file in the text field. 
input_fasta_flie = "bcl2.fasta" #@param {type:"raw"} 
if Input_type == "protein amino acid sequence" : 
  input_content = input_protein_amino_acid_sequence 
elif Input_type == "fasta file": 
  input_content = input_fasta_flie 
else:pass 
 
 
 
 
#@markdown #step 3.3 Choose whether to use ligand prompt 
ligand_prompt = False #@param {type:"boolean"} 
#@markdown -  If ligand prompt is not checked, the ligand prompt content will be ignored. 
if ligand_prompt == True: 
  ligand_prompt_content = "COc1ccc(cc1)C(=O)" #@param {type:"raw"} 
  ligand_content = "\'" + ligand_prompt_content + "\'" 
 
 
#@markdown #step 3.4 Set Additional Parameters 
 
#@markdown - At least how many molecules will be generated. 
number = 50 #@param {type:"integer"} 
 
#@markdown - Hardware device to use. Default is 'cuda'. 
device = "cuda" #@param ["cuda", "cpu"] 
 
#@markdown - Output directory for generated molecules. Default is './ligand_output/'. 
output = './ligand_output/' #@param {type:"raw"} 
 
#@markdown - how many molecules will be generated per batch. Try to reduce this value if you have low RAM. Default is 32. 
batch_size = 32 #@param {type:"integer"} 
 
#@markdown # Don't forget to run the cell. 
temp = "source activate druggpt && TOKENIZERS_PARALLELISM=false && python drug_generator.py " 
if Input_type == "no input": 
  temp = temp + "-e " 
elif Input_type == "protein amino acid sequence": 
  temp = temp + "-p " + input_content + " " 
else: 
  temp = temp + "-f " + input_content + " " 
 
if (ligand_prompt == True) and (Input_type != "no input"): 
  temp = temp + "-l " + ligand_content + " " 
 
temp = temp + "-n " + str(number) + " -d " + device + " -o " +output + " -b "+ str(batch_size) 
print(temp) 
 
!{temp} ?>

Did this file decode correctly?

Original Code

#@title STEP 3 Run druggpt

#@markdown # **Instructions**
#@markdown - If you select "protein amino acid sequence", input a protein amino acid sequence in the input_protein_amino_acid_sequence field.
#@markdown - If you select "fasta file", first upload the fasta file to the druggpt directory by dragging and dropping it into the file browser on the left side. Then, input the name of the fasta file as text in the input_fasta_file field.
#@markdown - If "no input" is selected, the input content will be ignored.

#@markdown #step 3.1 Select your input type
Input_type = "fasta file" #@param ["protein amino acid sequence", "fasta file", "no input"]
#@markdown #step 3.2 Provide the required input based on your selected input type:

#@markdown - For "protein amino acid sequence", input a protein amino acid sequence.
input_protein_amino_acid_sequence = "MAKQPSDVSSECDREGRQLQPAERPPQLRPGAPTSLQTEPQGNPEGNHGGEGDSCPHGSPQGPLAPPASPGPFATRSPLFIFMRRSSLLSRSSSGYFSFDTDRSPAPMSCDKSTQTPSPPCQAFNHYLSAMASMRQAEPADMRPEIWIAQELRRIGDEFNAYYARRVFLNNYQAAEDHPRMVILRLLRYIVRLVWRMH" #@param {type:"raw"}
#@markdown - Upload the fasta file to the "druggpt" directory by selecting the file and uploading it. Ensure that the file is placed within the same folder as the default "bcl2.fasta" file. Then, input the name of the fasta file in the text field.
input_fasta_flie = "bcl2.fasta" #@param {type:"raw"}
if Input_type == "protein amino acid sequence" :
  input_content = input_protein_amino_acid_sequence
elif Input_type == "fasta file":
  input_content = input_fasta_flie
else:pass




#@markdown #step 3.3 Choose whether to use ligand prompt
ligand_prompt = False #@param {type:"boolean"}
#@markdown -  If ligand prompt is not checked, the ligand prompt content will be ignored.
if ligand_prompt == True:
  ligand_prompt_content = "COc1ccc(cc1)C(=O)" #@param {type:"raw"}
  ligand_content = "\'" + ligand_prompt_content + "\'"


#@markdown #step 3.4 Set Additional Parameters

#@markdown - At least how many molecules will be generated.
number = 50 #@param {type:"integer"}

#@markdown - Hardware device to use. Default is 'cuda'.
device = "cuda" #@param ["cuda", "cpu"]

#@markdown - Output directory for generated molecules. Default is './ligand_output/'.
output = './ligand_output/' #@param {type:"raw"}

#@markdown - how many molecules will be generated per batch. Try to reduce this value if you have low RAM. Default is 32.
batch_size = 32 #@param {type:"integer"}

#@markdown # Don't forget to run the cell.
temp = "source activate druggpt && TOKENIZERS_PARALLELISM=false && python drug_generator.py "
if Input_type == "no input":
  temp = temp + "-e "
elif Input_type == "protein amino acid sequence":
  temp = temp + "-p " + input_content + " "
else:
  temp = temp + "-f " + input_content + " "

if (ligand_prompt == True) and (Input_type != "no input"):
  temp = temp + "-l " + ligand_content + " "

temp = temp + "-n " + str(number) + " -d " + device + " -o " +output + " -b "+ str(batch_size)
print(temp)

!{temp}

Function Calls

None

Variables

None

Stats

MD5 c670cd4dca7a7f0aa918074ab9e94e62
Eval Count 0
Decode Time 59 ms