valsson-group / super-cell-constructor

Tool for setting up molecular crystal super cell from cif files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Super Cell Constructor

Tool for setting up molecular crystal super cells from CIF files

Authors:

Requirments

  • ASE
  • Mercury visualization
  • Pymatgen
  • Rdkit
  • Open babel
  • NumPy

Instructions

Generate a PBC supercell from a CIF file collected from the CCDC database

  1. Save the CIF files for all polymorphs as PDB files using Mercury.
  2. Add missing Hs if required ( obabel file.pdb -O file.pdb -p 7) and change the space group to original space group.
  3. Select one as a template (preferably choose the PDB with a unique atom sequence) that will be used to match the atom sequence for other PDBs.
  4. Use ASE_cif_to_pymatgen_supercell_cif.py to generate the supercell cif file for the template.
  5. Save the supercell cif file as a PDB file in Mercury.
  6. Use mapping_sequence.py to match the atom sequence to the original PDB. (Ensure that the supercell PDB file saved from Mercury has a similar atom order as the single molecule PBD file, if not specially for highly symmetric molecule, manually create the list for key_mapping that matches the atom order).

If the molecule is not selected as the template file, before proceeding to the step3

  • First, reorder the PDB file to match the atom sequence with the template PDB file using reorder-atoms.py.
  • It should pass the validation and also visualize in Molden or Gaussview to ensure that the connectivity is similar to the template.
  • Use Open Babel to convert the reordered PDB to cif ( obabel input.pdb -O output.cif).
  • Change the space group to "P1" in the cif file (sed -i "s/_space_group_name_H-M_alt '.*'/_space_group_name_H-M_alt 'P1'/" your_file.cif).
  • Return to the step3.

Check the new file after each step to ensure that the code is doing the correct task

Acknowledgements

The development of this tool was supported by an DOE Early Career Award (BES Condensed Phase and Interfacial Molecular Science (CPIMS) / DE-SC0024283)

About

Tool for setting up molecular crystal super cell from cif files

License:MIT License


Languages

Language:Python 99.1%Language:Shell 0.9%