Open nickyoungforu opened 2 months ago
Hi, most of the molecules in the training set are no more than 30 atoms. Therefore, it is hard for the pretrained model to generate a large molecule. Please decrease the argument "num_atom" to no more than 30 atoms.
np.long
is a deprecated alias for np.compat.long
. To silence this warning, use np.compat.long
by itself. In the likely event your code does not need to work on Python 2 you can use the builtin int
for which np.compat.long
is itself an alias. Doing this will not modify any behaviour and is safe. When replacing np.long
, you may wish to use e.g. np.int64
or np.int32
to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
indicators = torch.zeros([pos.size(0), len(ATOM_FAMILIES)], dtype=np.long)
[04:14:11] Explicit valence for atom # 2 O, 3, is greater than permitted
Invalid,continue
generated smile: C.CC(=O)O.CCOCC(=O)O.CN.O.O=C(O)O.O=C1Cc2cccc(O)c2N1*** Open Babel Warning in PerceiveBondOrders Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders
*** Open Babel Warning in PerceiveBondOrders Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders
*** Open Babel Warning in PerceiveBondOrders Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders
*** Open Babel Warning in PerceiveBondOrders Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders
generated smile: O=C(O)c1ccccc1OP(O)O.OC1=CC=CC(C2=CC=C(O)CC=C2)C(O)=C1 generated smile: CC12CC3C4CC1(O)CC(O2)C41CNC(O)(O)C31F.O=C(O)CCO.O=C(O)CO 100%|███████████████████████████████████████████████████████████████████████| 2/2 [06:57<00:00, 208.70s/it] [2024-05-08 04:17:38,714::test::INFO] valid:18 [2024-05-08 04:17:38,714::test::INFO] stable:0 Can you help me find out what the problem is?Thank you! @Layne-Huang
Hi, PMDM could generate valid molecules for this target in my experiments. You could increase the value of 'num_samples' to allow the model for more attempts.
Thank you for your answer, but I encountered another problem. This is my command line:python -u PMDM_main/sample_for_pdb.py --ckpt /wuqi/stu/tianjl/PMDM/500.pt --pdb_path PMDM_main/my/3hmm/3hmmcut20/3hmmcut20_pocket.pdb --num_atom 35 --num_samples 10000 --sampling_type generalized
This is the error output:Traceback (most recent call last):
File "/wuqi/stu/tianjl/PMDM/PMDM_main/sample_for_pdb.py", line 393, in
I generate molecules using the following command: python -u sample_for_pdb.py --ckpt checkpoints/500.pt --pdb_path test_data/3ug2.pdb --num_atom 50 --num_samples 2 --sampling_type generalized --build_method build Why are the generated molecules all unstable ?
generated smile: [C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C]#[C].[C]C[C][C][O].[O] generated smile: [C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C].[C]#[C].[N].[N].[O][O] 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:36<00:00, 36.71s/it] [2024-05-06 16:16:47,651::test::INFO] valid:2 [2024-05-06 16:16:47,651::test::INFO] stable:0