ADD5b. Creating a Rigid Body

ADD5b. Creating a Rigid Body

Creating a rigid body

TOPAS includes a 'rigid-body editor' which can be used to create and test rigid bodies. There are some examples of rigid bodies in the 'C:\TOPAS7\rigid' folder; if at any point you get stuck while editing the z_matrix for this section, it may help to look at some of the examples in this folder.

  1. In TOPAS, select 'Tools' > 'New Rigid-body editor Window'.

  2. Click 'Load / Hide' to bring up the file load dialogue, navigate to the file 'para_partial.rgd' and double click on it to open it in the editor. This is a partially completed z_matrix description of an idealised paracetamol molecule. Notice how bond lengths (prm !rCC 1.30, prm !rCO 1.20 etc.) and dihedral angles (prm !dCOH 90, prm !dCNC 90 etc.) are defined as parameters at the top of the rigid body. These parameters also have sensible min and max values applied to them. Try changing a few of these parameters and click Update to see the effect on the rigid body.

  3. Edit the z_matrix to add the C=O and CH3 groups on the end of the molecule. Use the naming scheme shown below (i.e. add O2, C8, H8, H9 and H10). It is best to add one site at a time, then click Update to see the effect on the rigid body. This will allow you to fix problems as you go. The completed structure should look like this:

  4. If you are having problems adding atoms to the rigid body, there are some hints here at the bottom of this page. If you are completely stuck (or just not that interest in creating your own rigid bodies) para_complete.rgd is also provided.

  5. Click 'Save As' and save your new .rgd file of the completed paracetamol rigid body on your computer.

Matching a rigid body to a known structure

Although we now have a rigid body description of the paracetamol molecule, we don't yet know the translations / rotations needed to get the molecule where it should be within the unit cell. We can use TOPAS to optimise the position of the paracetamol rigid body to that of the known atomic positions from a .cif file; thanks to Prof Simon Parsons, University of Edinburgh, for this tip! In order for us to do this, it is easiest if the naming conventions in our rigid body are the same as those from our .cif. The site names in the rigid body described above already match those of the .cif file, so in this case we can carry on.

  1. Start a fresh PDF refinement using "para_300K_pdf.xy" as the filename (TOPAS_for_PDF > 1. PDF data > Select Data File) and save the input file as 'para_300K_optimise.inp'. We will use this file to optimise the geometry of the rigid body.

  2. Enter a dQ damping with a value of 0.08 (TOPAS_for_PDF > 2. Instrumental parameters > dQ damping).

  3. Load structure from para.cif (TOPAS_for_PDF > 3. Phase information > 3b. add new phase from CIF > i. Structure from CIF for PDF).

  4. Click TOPASforPDF > 3. Phase information > 3. add new phase from CIF > add rigid body to add a placeholder for your rigid body information, then copy the rigid body information into the file where it says ‘Paste rigid body information here. The text area you have been editing in TOPAS can be directly copied into the .inp file in VS Code, just make sure that you don’t end up with two rigid keywords. The rigid body will be used to calculate the fractional coordinates of the sites.

  5. If you run a TOPAS refinement now, you will get an error of 'Cannot find site: X1'. That is because the dummy atoms X1, X2 and X3 are in the rigid body description, but aren't declared as sites (yet). Add one site line for each dummy atom, but with zero site occupancy (see hint at the bottom of the page if stuck).

  6. Create a copy of all of the real atom sites (not X1, X2 and X3), but re-name these sites dummyC1, dummyC2 , dummyC3 etc. and set their occupancy to zero. These will be dummy sites which we will use to move the rigid body sites onto the original atomic positions from the cif file.

  7. Add a distance restraint (TOPAS_for_PDF > 3. Phase information > constraints and restraints > distance restraint). Edit the line to apply the restraint between sites dummyC1 and C1 for a distance of 0 and tolerance of 0.

    Distance_Restraint creates a penalty for when two sites are beyond a given distance. Here we are using to minimise the distance between two sites, but normally it would be used to force a bond length towards a known value.

  8. Use rectangular selection in VS Code to copy and edit the line to give you one Distance_Restrain line per dummy site.

  9. Add view_structure so you can watch how the refinement progresses.

  10. Write the keyword only_penalties into the top of your input file. The tells TOPAS not to fit to the data, and instead only minimise the distance penalties. Also uncomment continue_after_convergence at the top of the file; this tells TOPAS not to stop after one convergence, but instead to carry on. This is necessary because the global minimum is not found within a single refinement in this case (as is often the case for structure solution). TOPAS will randomise the starting position of the rigid body at the end of a convergence (this is what the line rand_xyz = Rand(0, 1); does) and start again.

  11. Run the refinement, and watch the rigid body move onto the atomic coordinates from the .cif file using the structure viewer. After about 30 seconds the global minimum should be found and you can stop the refinement. Click Yes to update the .inp file with the values from the refinement.

    1. How well does the rigid body fit to the published crystal structure from the .cif file?

    2. Are there other angles within the rigid body that you could refine to improve the fit?

  12. The C7-N1-C4 bond angle is the source of the largest error between the published crystal structure and the idealised rigid body where it is fixed to 120°. Add a new refined bond angle, e.g. aCNC, and set the angle between C7, N1 and C4 to be equal to this parameter.

    Note that you can refine rigid body parameters by putting an @ sign before the value, but when you may re-use the parameter elsewhere it is best to provide your own name for it.

  13. Run the refinement again, and click Yes to update the .inp file and complete this refinement.

You now have the translate and rotate values needed for a good starting point for your PDF refinement in the next part of this tutorial.

 

 

 

 

 

Hints

First we need to add the O2 atom, which is connected to C7 by a bond distance with a parameter name of rCO. It is at an angle of 240° from atom N1, and we can use the dummy atom X2 to define a dihedral angle of 180 degrees.

Next we need to add the C8 atom, which is connected to C7 by a bond distance with a parameter name of rCC. It is at an angle of 120° from atom N1, and we can again use the dummy atom X2 to define a dihedral angle of 180 degrees.

Finally we need to add three H atoms (H8, H9 and H10), all connected to C8 by a distance of parameter rCH. They form roughly a tetrahedron, so they will all be at an angle of 109.5° from atom C7. It is useful to refine a rotation angle for this CH3 group (e.g. parameter name aCH3) and have the free dihedral angles all relative to X2 with values of dCH3, dCH3+120 and dCH3+240.

site X1 x 0 y 0 z 0 occ H 0