diff --git a/xyz/smile_to_xyz.py b/xyz/smile_to_xyz.py new file mode 100644 index 0000000..ce6601e --- /dev/null +++ b/xyz/smile_to_xyz.py @@ -0,0 +1,15 @@ +from rdkit import Chem +from rdkit.Chem import AllChem + +smiles = "Oc1ccc(C=O)cc1O" +mol = Chem.MolFromSmiles(smiles) +molH = Chem.AddHs(mol) +AllChem.EmbedMolecule(molH) + + +if mol: + xyz = Chem.MolToXYZBlock(molH) + +xyzfile = open(f"orca.xyz", "w") +xyzfile.write(f"{xyz}") +xyzfile.close() \ No newline at end of file