Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate crystal from a given building block #155

Closed
qzhu2017 opened this issue Jul 27, 2021 · 1 comment
Closed

generate crystal from a given building block #155

qzhu2017 opened this issue Jul 27, 2021 · 1 comment

Comments

@qzhu2017
Copy link
Collaborator

Probably will be useful for mol. xtal which is based on the packing of motifs (e.g., cyclic dimers).

s = pyxtal(molecular=True)
s.from_random(3, 14, ['C1=C(C=C(C=C1[N+](=O)[O-])[N+](=O)[O-])C(=O)O.smi', 'CC1=CC2=C(C=C1)N3CC4=C(C=CC(=C4)C)N(C2)C3.smi'], block='dimer.xyz')

In this case, we will attempt to assemble the packing from the building blocks.

@qzhu2017
Copy link
Collaborator Author

from pyxtal import pyxtal

smiles = ["C1=C(C=C(C=C1[N+](=O)[O-])[N+](=O)[O-])C(=O)O.smi",
          "CC1=CC2=C(C=C1)N3CC4=C(C=CC(=C4)C)N(C2)C3.smi"]

s = pyxtal(molecular=True)
s.from_random(3, 14, smiles, block='xxv')
print(s)
------Crystal from random------
Dimension: 3
Composition: [C1=C(C=C(C=C1[N+](=O)[O-])[N+](=O)[O-])C(=O)O]4[CC1=CC2=C(C=C1)N3CC4=C(C=CC(=C4)C)N(C2)C3]4
Group: P21/c (14)
monoclinic lattice:  25.3254  20.1843  14.2472  90.0000  97.1375  90.0000
Wyckoff sites:
	H4C7N2O6     @ [ 0.3118  0.8145  0.0553]  WP [4e] Site [1] Euler [   0.0    0.0    0.0]
	H18C17N2     @ [ 0.5863  0.7268  0.3577]  WP [4e] Site [1] Euler [   0.0    0.0    0.0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant