{"id":20508353,"url":"https://github.com/citrineinformatics/crystal-refinement","last_synced_at":"2025-05-09T07:31:46.687Z","repository":{"id":149683490,"uuid":"86116243","full_name":"CitrineInformatics/crystal-refinement","owner":"CitrineInformatics","description":"Automated refinement of single crystal diffraction data using SHELXTL","archived":true,"fork":false,"pushed_at":"2019-04-01T23:48:57.000Z","size":653,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-21T08:48:52.981Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CitrineInformatics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-03-24T22:41:24.000Z","updated_at":"2025-03-11T13:51:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"b8df4305-8408-4bc4-92a2-a3b782670f18","html_url":"https://github.com/CitrineInformatics/crystal-refinement","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CitrineInformatics%2Fcrystal-refinement","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CitrineInformatics%2Fcrystal-refinement/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CitrineInformatics%2Fcrystal-refinement/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CitrineInformatics%2Fcrystal-refinement/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CitrineInformatics","download_url":"https://codeload.github.com/CitrineInformatics/crystal-refinement/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253209360,"owners_count":21871643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T20:18:14.400Z","updated_at":"2025-05-09T07:31:46.377Z","avatar_url":"https://github.com/CitrineInformatics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python library for automated single crystal refinement with Shelx\n\nAuthors: E. Antono and J. Ling at Citrine Informatics\n\nPlease contact: erin (at) citrine (dot) io with any questions.\n\nThis package is intended to be used with the SHELX code suite:\nSheldrick, George M. \"A short history of SHELX.\" Acta Crystallographica Section A: Foundations of Crystallography 64.1 (2008): 112-122.\n\nThe purpose of this package is to automate many of the steps in single crystal refinement.  It\nautomatically detects split occupancy, deficiency, wrong element assignments, and anisotropy.\n\n# Installation:\n\nClone this git repo:\n```sh\ngit clone git@github.com:CitrineInformatics/crystal-refinement.git\n```\nThen, use:\n```sh\npip install -r requirements.txt\npython setup.py install\n```\nto install python dependencies and the crystal structure refinement package. We recommend that this step is done in a\npython virtual environment (https://virtualenv.pypa.io/en/stable/).\n\n# Other Dependencies:\n\n- SHELXTL executables (xl.exe and xs.exe on Windows, shelxl and shelxs on MacOS).\n- In order to use the machine learning model for bond lengths, you will also need to create a free account at\nhttps://citrination.com\n- Graphviz to render the optimization graphs: https://graphviz.gitlab.io/download/\n\n# Usage\nThe optimization package can be run using a command line interface and configuration file. Run `crystal_refinement -h`\nto see the help menu for the command line interface.\n\nTo run an example optimization on the ins file in the example folder, change the `path_to_xl` and `path_to_xs` values\nin the `minimal.yml` file to correspond to the path of the SHELX executables on your machine. Then run:\n```sh\ncrystal_refinement -c minimal.yml -d examples/ -i input -o test\n```\nThe results of the optimization will be output to the `examples/optimizer_results` directory. `0.res` is the highest\nscoring result file, `optimization_graph.pdf` is the optimization graph generated by graphviz, and `report.txt` will\ncontain metadata on the optimization process.\n\nSee `config.yml` for further documentation of the configuration file parameters.\n\nThe optimization package can also be used directly in python by creating an instance of the `Optimizer` object and\nusing the `run()` method.\n\n# How it works\n\nThe optimizer tries the following steps in order:\n1) Identify crystal sites (try adding or removing Q peaks)\n2) Switch elements at each crystal site\n3) Try site mixing at each site\n4) Try partial occupancy at each site\n5) Try extinguishing\n6) Try anisotropy \n\nAt each step, the optimization takes into account both the fit R1 value as well as the bond lengths.\nThe ideal bond lengths can be determined by 3 different methods:\n1) User input via the bond_length argument to the Optimizer class\n2) A machine learning model for bond length hosted at citrination.com.  To use this model, the user must have a free\naccount on the public Citrination site.\n3) Atomic radii of the elements\n\nThe optimizer will follow multiple paths to see which path yields the best final fit.  For example, if two different\nelements both yield similar R1 values at a given crystal site, the optimizer will try both options to see which give\nthe best final fit.  This results in a branching tree structure.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitrineinformatics%2Fcrystal-refinement","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitrineinformatics%2Fcrystal-refinement","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitrineinformatics%2Fcrystal-refinement/lists"}