Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide new mol file to sdf writer. #98

Open
TJGorrie opened this issue Mar 22, 2022 · 0 comments
Open

Provide new mol file to sdf writer. #98

TJGorrie opened this issue Mar 22, 2022 · 0 comments
Assignees

Comments

@TJGorrie
Copy link

new.create_mol_file(
directory=new.mol_dict["directory"][i],
file_base=new.mol_dict["file_base"][i],
mol_obj=new.mol_dict["mol"][i],
smiles_file=smiles_file,
) # creates mol file for each ligand
writer = Chem.rdmolfiles.SDWriter(
os.path.join(
new.mol_dict["directory"][i],
str(new.mol_dict["file_base"][i] + ".sdf"),
)
)
new.create_sd_file(
new.mol_lst[i], writer
) # creates sd file containing all mol files
writer.close() # this is important to make sure the file overwrites each time

@TJGorrie TJGorrie self-assigned this Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant