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

A few extra cif2cell tips #15

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions docs/workshop/08_cif2cell.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
We will use cif to cell to generate cell files from cif files. Cif files can be obtained from the ICSD (inorganic crystals) or the CSD (molecular crystals).
We will use cif to cell to generate cell files from cif files. Cif files can be obtained from the [ICSD](https://www.psds.ac.uk/) (inorganic crystals) or the [CSD](https://www.ccdc.cam.ac.uk/structures/) (molecular crystals).

'''MgO'''
Examine the [file](http://www.castep.org/files/MgO.cif). Look at the crystal structure with jmol or magresview (drag and drop the file onto the magresview window). You will see a cubic face-centre cubic cell. How many atoms in the cell?
## MgO

Examine the [file](http://www.castep.org/files/MgO.cif). Look at the crystal structure with jmol or [magresview](https://ccp-nc.github.io/magresview-2/) (drag and drop the file onto the magresview window). You will see a cubic face-centre cubic cell. How many atoms in the cell?

Use cif2cell to convert this cif file to a cell file.

```
cif2cell MgO.cif --program=castep -o MgO.cell
```

Look at the cell file. How many atoms in the cell? View this will jmol or magresview. Do you understand what cif2cell has done?


'''Molecular Tweezers'''
To obtain the conventional unit cell, use the --no-reduce option when running `cif2cell`. Note that `cif2cell` assumes that values such as 0.333333 mean ⅓, and silently corrects the decimal so it corresponds to the machine-precision representation of the fraction, e.g. 0.33333333333, which may not be correct.

Using the `--export-cif-labels` option ensures that any site labels in the .cif file are used in the .cell file and thereby also in the .castep and .magres files. This is extremely useful for keeping track of equivalent/special sites. For example, you might do:

```
cif2cell --export-cif-labels <seedname>.cif -p castep -o <seedname>.cell
```

A note that some versions of cif2cell use the tag `ID` in the generated .cell file, which is not recognised by CASTEP. In this case, the tag should be changed to `LABEL`.



## Molecular Tweezers
Examine the [file](http://www.castep.org/files/GUQHUV.cif)
Loading