Dateien nach "xyz" hochladen
This commit is contained in:
parent
1873aac479
commit
f81fd27347
15
xyz/smile_to_xyz.py
Normal file
15
xyz/smile_to_xyz.py
Normal file
@ -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()
|
||||
Loading…
x
Reference in New Issue
Block a user