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

Add a from_csd function #174

Closed
qzhu2017 opened this issue Dec 1, 2021 · 5 comments
Closed

Add a from_csd function #174

qzhu2017 opened this issue Dec 1, 2021 · 5 comments
Assignees

Comments

@qzhu2017
Copy link
Collaborator

qzhu2017 commented Dec 1, 2021

If the CSD python is available, we can import the structure from CSD

@qzhu2017 qzhu2017 self-assigned this Dec 1, 2021
qzhu2017 added a commit that referenced this issue Dec 1, 2021
@qzhu2017
Copy link
Collaborator Author

qzhu2017 commented Dec 1, 2021

import warnings
warnings.filterwarnings('ignore')

from pyxtal import pyxtal
c = pyxtal(molecular=True)

for csd in [#'ACSALA', 'TROXAN', 'TRIZIN', 'HXMTAM', 'PYRZIN', 
            #'PYRZOL', 'CYHEXO', 'CYTSIN', 'ADAMAN01', 'IMAZOL01', 
            #'URACIL', 'ACETAC', 'CYANAM01', 'FORMAM', 'SUCACB02',
            'ECARBM01', 'XAFQAZ', 'KONTIQ09', 'XATJOT', 'XAFQON']:
    c.from_CSD(csd)
    print(c)
------Crystal from CSD: ECARBM01------
Dimension: 3
Composition: [CCOC(N)=O]2
Group: P-1 (2)
triclinic lattice:   5.0510   7.0110   7.5430  78.6300  75.4200  76.6500
Wyckoff sites:
	H7C3N1O2     @ [ 0.0448  0.5792  0.2108]  WP [2i] Site [1] Euler [   0.0    0.0    0.0]

------Crystal from CSD: XAFQAZ------
Dimension: 3
Composition: [OC(=O)c1cc(cc(c1)N(=O)=O)N(=O)=O]4[Cc1ccc2N3CN(Cc2c1)c1ccc(C)cc1C3]4
Group: P21/c (14)
monoclinic lattice:  10.4240  27.5781   8.1258  90.0000 109.5640  90.0000
Wyckoff sites:
	H4C7N2O6     @ [ 0.8215  0.0296  0.3667]  WP [4e] Site [1] Euler [   0.0    0.0    0.0]
	H18C17N2     @ [ 0.4518  0.1954  0.4124]  WP [4e] Site [1] Euler [   0.0    0.0    0.0]

------Crystal from CSD: KONTIQ09------
Dimension: 3
Composition: [OC(=O)c1cc(O)c(O)c(O)c1]4[O]4
Group: P21/c (14)
monoclinic lattice:   9.7573   3.5579  21.5170  90.0000  91.3380  90.0000
Wyckoff sites:
	H6C7O5       @ [ 0.6927  0.9477  0.1405]  WP [4e] Site [1] Euler [   0.0    0.0    0.0]
	H2O1         @ [ 0.8928  0.5034  0.9280]  WP [4e] Site [1] Euler [   0.0    0.0    0.0]

------Crystal from CSD: XATJOT------
Dimension: 3
Composition: [[nH+]1cccc2cccnc12]4[OC(=O)C=CC(=O)[O-]]4
Group: Pca21 (29)
orthorhombic lattice:  23.5010   3.7141  12.6535  90.0000  90.0000  90.0000
Wyckoff sites:
	H7C8N2       @ [ 0.2272  0.3356  0.8232]  WP [4a] Site [1] Euler [   0.0    0.0    0.0]
	H3C4O4       @ [ 0.9672  0.0993  0.5601]  WP [4a] Site [1] Euler [   0.0    0.0    0.0]
[19:50:26] Warning: molecule is tagged as 3D, but all Z coords are zero
[19:50:26] Warning: molecule is tagged as 3D, but all Z coords are zero

------Crystal from CSD: XAFQON------
Dimension: 3
Composition: [[Cl-]]4[NC(=[NH2+])SC=CC(O)=O]4[O]4
Group: P21/c (14)
monoclinic lattice:   3.9906  21.2366  10.1014  90.0000  97.8331  90.0000
Wyckoff sites:
	Cl1          @ [ 0.0512  0.7257  0.2944]  WP [4e] Site [1]
	H7C4S1N2O2   @ [ 0.7169  0.9374  0.6596]  WP [4e] Site [1] Euler [   0.0    0.0    0.0]
	H2O1         @ [ 0.9830  0.6826  0.5663]  WP [4e] Site [1] Euler [   0.0    0.0    0.0]

@qzhu2017
Copy link
Collaborator Author

qzhu2017 commented Dec 1, 2021

Todo:

  • Enable function to extract unique CSD_code from a given family
  • Enable the read of co-crystal d0ff9bb

@qzhu2017
Copy link
Collaborator Author

qzhu2017 commented Dec 2, 2021

Some structures cannot match the original one after loading. Needs to check!!!

@qzhu2017 qzhu2017 reopened this Dec 2, 2021
@qzhu2017
Copy link
Collaborator Author

qzhu2017 commented Dec 4, 2021

Fully debugged at 15de1dc

To run more tests with different csd structures

@qzhu2017
Copy link
Collaborator Author

qzhu2017 commented Dec 5, 2021

  • if smiles returns duplicates, merge it to one.

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