Tutorial 7: Supercell of a Molecule ====================================== .. contents:: :local: In this tutorial, we will show you how to use pdbtop to prepare a molecule from crystal information file. A Human-Friendly Structure -------------------------- Assume we want to study a molecule extracted from a crystal file, like below: .. code-block:: bash :caption: 4501688.xyz :linenos: 52 6.82330000 0.00000000 0.00000000 -0.61173682 7.61747610 0.00000000 -2.88460658 -3.00446059 10.11298264 F 3.20571333 1.57108292 8.64215044 N -0.01000558 1.36877398 5.42065982 F -0.18209647 5.88197647 0.79821772 C -1.19930474 0.78322729 5.61472796 C 4.97105834 0.05673124 4.57814724 C 5.63578345 -0.09158089 3.36458932 H 5.22756058 -0.58646481 2.66375963 C 0.05684111 0.47005996 3.16637486 H 0.52680596 0.36225562 2.34722327 C 0.58837131 1.20165159 4.21913636 H 1.43408579 1.61426635 4.08665628 N -1.78584940 0.90741634 6.83769095 H 4.25956295 0.50412048 6.91829142 C -1.34573501 1.57535447 7.98419979 C -2.33210951 1.91487621 8.91054900 C -2.04149970 2.57198395 10.07556460 C 2.13466065 5.91632188 0.28518611 H 2.33762127 6.36779272 1.09624732 C 0.24883758 2.56937763 9.49204550 H 1.15021747 2.79249767 9.69228256 C -0.03236361 1.91615442 8.30882654 H 0.67332038 1.69578534 7.71216056 C 3.64481584 -0.56113934 4.77332781 O 2.97973169 -0.44724045 5.80272831 O 2.60913597 6.35161846 3.72754427 H 1.89161804 5.96240297 3.92484856 F 0.12124328 3.04193258 1.47083220 N 3.33696219 3.24424152 4.69232281 F 3.50905308 -1.26896097 9.31476492 C 4.52626135 3.82978822 4.49825468 C -1.64410173 4.55628426 5.53483540 C -2.30882685 4.70459639 6.74839332 H -1.90060397 5.19948032 7.44922301 C 3.27011550 4.14295554 6.94660777 H 2.80015065 4.25075988 7.76575937 C 2.73858530 3.41136392 5.89384628 H 1.89287082 2.99874915 6.02632635 N 5.11280601 3.70559917 3.27529169 H -0.93260634 4.10889503 3.19469122 C 4.67269162 3.03766103 2.12878285 C 5.65906612 2.69813930 1.20243364 C 5.36845631 2.04103156 0.03741804 C 1.19229596 -1.30330638 9.82779653 H 0.98933534 -1.75477721 9.01673532 C 3.07811903 2.04363788 0.62093713 H 2.17673913 1.82051783 0.42070008 C 3.35932022 2.69686109 1.80415610 H 2.65363623 2.91723016 2.40082208 C -0.31785924 5.17415484 5.33965483 O 0.34722492 5.06025595 4.31025433 O 0.71782064 -1.73860296 6.38543837 H 1.43533857 -1.34938747 6.18813408 The structure is shown below: .. image:: _static/figs/p14.png This strucutre is very ugly and is not human-friendly. However, if we know its lattice cell information, we can use a single command to convert it into a good structure: .. code-block:: bash $ pdbtop ligand -i 4501688.xyz --pbc "6.82330000 0.00000000 0.00000000 -0.61173682 7.61747610 0.00000000 -2.88460658 -3.00446059 10.11298264" -o adjust There are two sets of output: - ``adjust.*``: The output based on the original structure; - ``adjust-sc.*``: The output based on the converted structure. The structure of ``adjust-sc.pdb`` is shown below, which looks much better than the original one: .. image:: _static/figs/p15.png Build Supercells -------------------------- Assume we want to study this molecule in crystal environment, we can build a supercell, like 5x5x5, so we can use the option ``--super-cells``: .. code-block:: bash $ pdbtop ligand -i 4501688.xyz --pbc "6.82330000 0.00000000 0.00000000 -0.61173682 7.61747610 0.00000000 -2.88460658 -3.00446059 10.11298264" --super-cells "2 2 2" -o supercell Here, "--super-cells 2 2 2" means we include the 2 images in the direction of +X,-X,+Y,-Y,+Z,-Z. The output structure ``supercell-sc.pdb`` is shown below: .. image:: _static/figs/p16.png