Dateien nach "xyz" hochladen
This commit is contained in:
@@ -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()
|
||||||
Reference in New Issue
Block a user