mhlee216 / MGCVAE

Code for "MGCVAE: Multi-Objective Inverse Design via Molecular Graph Conditional Variational Autoencoder" (https://doi.org/10.1021/acs.jcim.2c00487)
26 stars 8 forks source link

different size of molecules #4

Open nczub opened 1 year ago

nczub commented 1 year ago

Hi, I'm trying to use your code for a database with more atoms in molecules. Is it possible to change your code in this manner?

mhlee216 commented 1 year ago

Try changing "--size" in argparse. Good luck.

nczub commented 1 year ago

yes, I've already try this. When I changed this for example to 30 and I got this error:

File "/data1/dane/MGCVAE_MULTI-OBJECTIVE_optimization/MGCVAE-main/code/mgcvae.py", line 168, in feature_size(data[i], atom_labels, atom_number), File "/data1/dane/MGCVAE_MULTI-OBJECTIVE_optimization/MGCVAE-main/Natalia/graph_converter.py", line 13, in feature_size feature = graph_features(mol, atom_labels, max_length) File "/data1/dane/MGCVAE_MULTI-OBJECTIVE_optimization/MGCVAE-main/Natalia/graph_converter.py", line 10, in graph_features return np.vstack((features, np.zeros((max_length - features.shape[0], features.shape[1])))) ValueError: negative dimensions are not allowed

mhlee216 commented 1 year ago

The dataframe should have a 'Length' column, which should contain the number of atoms, NOT the length for the SMILES of that row.

It's probably a problem with SMILES having more than 30 atoms.