3
$\begingroup$

Rdkit: How can I get a weighted adjacency matrix where the weights are bond lengths, from the SMILES of my molecule?

The above link is code to get bond length matrix from smiles.

Now are we able to convert to an XYZ file?

$\endgroup$
4
  • $\begingroup$ From that, you can generate a set of internal coordinates. All computational software can work also with that kind of input $\endgroup$ Commented Feb 12, 2023 at 9:32
  • 1
    $\begingroup$ Here is a question and answer that explains how to do this if you have the full set of distances. In general though, it may not be possible to reconstruct the full 3-D geometry from just the bond lengths. For instance, in methane, there will only be four bond lengths in your weighted adjacency matrix, which is insufficient to get the 9 degrees of freedom necessary to embed the molecule in 3-D space. math.stackexchange.com/questions/156161/… $\endgroup$
    – jheindel
    Commented Feb 19, 2023 at 19:45
  • $\begingroup$ @jheindel do you think you can write a full answer so that this question can be cleared from our unanswered queue? $\endgroup$ Commented Oct 21, 2023 at 15:57
  • $\begingroup$ I think it's easier to first get the xyz and then build the adjacency matrix. In any case, either rdkit or OpenBabel are able to generate xyz coordinates from smiles. $\endgroup$
    – Anon
    Commented Nov 5, 2023 at 20:04

1 Answer 1

2
$\begingroup$

jheindel's comment points to an answer:

"Here is a question and answer that explains how to do this if you have the full set of distances. In general though, it may not be possible to reconstruct the full 3-D geometry from just the bond lengths. For instance, in methane, there will only be four bond lengths in your weighted adjacency matrix, which is insufficient to get the 9 degrees of freedom necessary to embed the molecule in 3-D space. https://math.stackexchange.com/q/156161/202425"

If someone would like to write an answer, I can delete this Community Wiki answer (you can just ask me in a comment on this answer, or click "flag" and "In need of moderator intervention" and explain yourself).

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .