You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while converting the **smi** files to other formats like **pdb** or **mol** sometimes the obabel can't read **Cl** atoms in the smiles becuase they are not in the proper format or the **Cl** is sometimes written as **l**. To fix this error use python code as given below:
with open("list.txt", "r") as input_file: # replace list.txt according to your file name
smiles_data = input_file.read()
# Replace 'l' with 'Cl' in the SMILES data
modified_smiles_data = smiles_data.replace("l", "Cl")
# Save the modified SMILES data to a new file
with open("modified_smiles.txt", "w") as output_file:
output_file.write(modified_smiles_data)
This code will generate a new fixed file named as 'modified_smiles.txt'.
The text was updated successfully, but these errors were encountered:
I'm sorry but I fail to see why it's an issue with OpenBabel that you have broken SMILES strings. And running this code will produce garbage if you have a proper SMILES since every instance of "Cl" will be "CCl"...
while converting the
**smi**
files to other formats like**pdb**
or**mol**
sometimes the obabel can't read**Cl**
atoms in the smiles becuase they are not in the proper format or the**Cl**
is sometimes written as**l**
. To fix this error use python code as given below:This code will generate a new fixed file named as 'modified_smiles.txt'.
The text was updated successfully, but these errors were encountered: