You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
541 B
16 lines
541 B
2 years ago
|
import random
|
||
|
|
||
|
def gerar_smiles_molecula():
|
||
|
simbolos_atomos = ['H', 'C', 'N', 'O', 'F', 'P', 'S', 'Cl']
|
||
|
comprimento_molecula = random.randint(5, 15) # Determina o comprimento do SMILES da molécula
|
||
|
|
||
|
smiles = ''
|
||
|
for _ in range(comprimento_molecula):
|
||
|
simbolo = random.choices(simbolos_atomos, weights=[0.2, 0.3, 0.1, 0.1, 0.05, 0.05, 0.05, 0.1])[0]
|
||
|
smiles += simbolo
|
||
|
|
||
|
return smiles
|
||
|
|
||
|
smiles_molecula = gerar_smiles_molecula()
|
||
|
print("SMILES da molécula de grande energia gerada: ", smiles_molecula)
|