{"action":"created","issue":{"url":"https://api.github.com/repos/qzhu2017/PyXtal/issues/26","repository_url":"https://api.github.com/repos/qzhu2017/PyXtal","labels_url":"https://api.github.com/repos/qzhu2017/PyXtal/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/qzhu2017/PyXtal/issues/26/comments","events_url":"https://api.github.com/repos/qzhu2017/PyXtal/issues/26/events","html_url":"https://github.com/qzhu2017/PyXtal/issues/26","id":347781498,"node_id":"MDU6SXNzdWUzNDc3ODE0OTg=","number":26,"title":"unit test script","user":{"login":"qzhu2017","id":29445366,"node_id":"MDQ6VXNlcjI5NDQ1MzY2","avatar_url":"https://avatars0.githubusercontent.com/u/29445366?v=4","gravatar_id":"","url":"https://api.github.com/users/qzhu2017","html_url":"https://github.com/qzhu2017","followers_url":"https://api.github.com/users/qzhu2017/followers","following_url":"https://api.github.com/users/qzhu2017/following{/other_user}","gists_url":"https://api.github.com/users/qzhu2017/gists{/gist_id}","starred_url":"https://api.github.com/users/qzhu2017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qzhu2017/subscriptions","organizations_url":"https://api.github.com/users/qzhu2017/orgs","repos_url":"https://api.github.com/users/qzhu2017/repos","events_url":"https://api.github.com/users/qzhu2017/events{/privacy}","received_events_url":"https://api.github.com/users/qzhu2017/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-06T05:17:37Z","updated_at":"2018-08-06T20:33:17Z","closed_at":null,"author_association":"OWNER","body":"@scottfredericks \r\nWhen I tried to follow the tutorial to run the script, it returned some annoying messages. It would be good to create a simple test script and make sure you run it every time after you updated the code.\r\n\r\n```python\r\nqiangzhu@Qiangs-MacBook-Pro:~/Desktop/github/pyXtal$ python -m pyxtal.crystal\r\n/Users/qiangzhu/miniconda3/lib/python3.6/site-packages/pymatgen/io/cif.py:44: UserWarning: Please install optional dependency pybtex if youwant to extract references from CIF files.\r\n  warnings.warn(\"Please install optional dependency pybtex if you\"\r\nSpace group  requested:  206 generated 230\r\n    Could not write cif file.\r\nSpace group  requested:  206 generated 206\r\n    Could not write cif file.\r\nSpace group  requested:  206 generated 206\r\n    Could not write cif file.\r\nSpace group  requested:  206 generated 206\r\n    Could not write cif file.\r\nSpace group  requested:  206 generated 206\r\n    Could not write cif file.\r\nSpace group  requested:  206 generated 206\r\n    Could not write cif file.\r\nSpace group  requested:  206 generated 206\r\n    Could not write cif file.\r\nSpace group  requested:  206 generated 206\r\n    Could not write cif file.\r\nSpace group  requested:  206 generated 206\r\n    Could not write cif file.\r\nSpace group  requested:  206 generated 206\r\n    Could not write cif file.\r\nqiangzhu@Qiangs-MacBook-Pro:~/Desktop/github/pyXtal$ python -m pyxtal.molecular_crystal\r\n/Users/qiangzhu/miniconda3/lib/python3.6/site-packages/pymatgen/io/cif.py:44: UserWarning: Please install optional dependency pybtex if youwant to extract references from CIF files.\r\n  warnings.warn(\"Please install optional dependency pybtex if you\"\r\nTraceback (most recent call last):\r\n  File \"/Users/qiangzhu/miniconda3/lib/python3.6/runpy.py\", line 193, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"/Users/qiangzhu/miniconda3/lib/python3.6/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/Users/qiangzhu/Desktop/github/pyXtal/pyxtal/molecular_crystal.py\", line 1303, in <module>\r\n    rand_crystal = molecular_crystal(options.sg, system, numMols0, options.factor, orientations=orientations, check_atomic_distances=checkatoms, allow_inversion=allowinversion)\r\n  File \"/Users/qiangzhu/Desktop/github/pyXtal/pyxtal/molecular_crystal.py\", line 411, in __init__\r\n    self.get_orientations()\r\n  File \"/Users/qiangzhu/Desktop/github/pyXtal/pyxtal/molecular_crystal.py\", line 453, in get_orientations\r\n    allowed = orientation_in_wyckoff_position(mol, self.sg, wp_index, already_oriented=True, allow_inversion=self.allow_inversion, PBC=self.PBC)\r\nAttributeError: 'molecular_crystal' object has no attribute 'PBC'\r\n```"},"comment":{"url":"https://api.github.com/repos/qzhu2017/PyXtal/issues/comments/410843997","html_url":"https://github.com/qzhu2017/PyXtal/issues/26#issuecomment-410843997","issue_url":"https://api.github.com/repos/qzhu2017/PyXtal/issues/26","id":410843997,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDg0Mzk5Nw==","user":{"login":"scottfredericks","id":16890472,"node_id":"MDQ6VXNlcjE2ODkwNDcy","avatar_url":"https://avatars0.githubusercontent.com/u/16890472?v=4","gravatar_id":"","url":"https://api.github.com/users/scottfredericks","html_url":"https://github.com/scottfredericks","followers_url":"https://api.github.com/users/scottfredericks/followers","following_url":"https://api.github.com/users/scottfredericks/following{/other_user}","gists_url":"https://api.github.com/users/scottfredericks/gists{/gist_id}","starred_url":"https://api.github.com/users/scottfredericks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottfredericks/subscriptions","organizations_url":"https://api.github.com/users/scottfredericks/orgs","repos_url":"https://api.github.com/users/scottfredericks/repos","events_url":"https://api.github.com/users/scottfredericks/events{/privacy}","received_events_url":"https://api.github.com/users/scottfredericks/received_events","type":"User","site_admin":false},"created_at":"2018-08-06T20:33:17Z","updated_at":"2018-08-06T20:33:17Z","author_association":"COLLABORATOR","body":"@qzhu2017 \r\nI've fixed the cif file output, so that it should succeed. It checks if the file already exists. If it does, it increases a variable called filecount by 1, which is appended to the end of the filename.\r\n\r\nI will work on a master test script to comprehensively test all functionalities."}}
{"actor":{"display_login":"scottfredericks"}}