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

how I can export embeddings #57

Open
sll513 opened this issue Sep 10, 2022 · 3 comments
Open

how I can export embeddings #57

sll513 opened this issue Sep 10, 2022 · 3 comments

Comments

@sll513
Copy link

sll513 commented Sep 10, 2022

Is that possible I can export embeddings for a given docked sdf, like .latent file? Thanks

@mattragoza
Copy link
Owner

Yes, if you have the option generate: output_latents: True in generate.config, the latent vectors for each generated sample will be written to files in the {out_dir}/latents/ subdirectory. They will be text files with one value per line named using the pattern {out_prefix}_{example_idx}_lig_gen_{sample_idx}.latent, where example_idx refers to the row number in the input data file.

@sll513
Copy link
Author

sll513 commented Sep 13, 2022

Thanks. this is very useful. additional query, how I can get the embeddings for a pre-docked cmpd (not the de novo designed cmpd)

@mattragoza
Copy link
Owner

There is no distinction between the latent space of the generated molecule and the input molecule. If you set the variability factor to zero, the latent vector represents the mean of the posterior distribution for the input ligand, which represents the input ligand in some sense. Just bear in mind that this is not guaranteed to decode to the same exact molecule, as there is some reconstruction error.

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

2 participants