-
Notifications
You must be signed in to change notification settings - Fork 49
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
Generate same complex in diffrent runs #99
Comments
Hi, Regarding a solution: Currently the only way I know to achieve this is to set numpy's global seed: import numpy as np
from molSimplify.Scripts.generator import startgen
np.random.seed(0)
startgen(['main.py', '-i', 'CLIinput.inp'], True, gui=False) I will also add this to our list of feature requests for the next release! |
This comment was marked as duplicate.
This comment was marked as duplicate.
Hi, Metal Core: ZN Command: The output XYZ file is different in each running. I tried two approaches,
and
But still the XYZ is different in different runs. Any help to solve the issue will be appreciated. Thanks, |
Thanks for the follow up! Bad news up front: I was not able to fully eliminate all sources of randomness. As far as I can tell this is mostly due to the fact that we rely heavily on openbabel. The main source of randomness is the conversion from smiles to a 3d structure and openbabel currently does not implement a random seed for this transformation (see openbabel/openbabel#1934 for more details). A workaround might be to add the ligand to a custom database, see http://hjkgrp.mit.edu/tutorials/2018-05-09-molsimplify-tutorial-10-adding-ligands-molsimplify/ section 2 (Due to a bug in that function you might need to run this command twice if you have not yet set up a custom data path). This way the conversion is only run the first time when the ligand is added. After trying this (and setting the random seeds) I still found a small variation in the generated structures that I will have to investigate further but most likely stems from the openbabel force field optimization. |
Ok. Thanks. I will try adding ligands to DB. |
Hi,
I am wondering if there is any parameter (like set a seed random) to set to generate same structure in different run for the same metal core and ligands? In the current version, if we run the program on the same metal-ligand complex we will get slightly different results for each run.
The text was updated successfully, but these errors were encountered: