<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    <br>
    in addition, see implementation of <br>
    <br>
    iotbx.show_distances your.pdb &gt; all_distances<br>
    <br>
    that will output potentially long file with distances "all with all"
    (with some cut-off I think) including symmetry related.<br>
    <br>
    Also, a method expand_to_p1() of xray.structure
    (cctbx/xray/structure.py) may be of help: this will expand model
    into P1 (isn't it what you want!).<br>
    Actual code that does the calculations:<br>
    cctbx_project/cctbx/xray/scatterer_utils.h (expand_to_p1)<br>
    <br>
    All in all, cctbx offers a variety of tools to do what you want.
    Perhaps someone needs to add a command like<br>
    <br>
    iotbx.expand_to_p1 your_model_in_any_space_group.pdb &gt;
    model_p1.pdb<br>
    <br>
    though it sounds like you want this at your script level, not as
    end-user-ready application.<br>
    <br>
    Let me know if you have more questions or need help with this.<br>
    <br>
    Pavel<br>
    <br>
    <div class="moz-cite-prefix">On 4/7/15 2:16 PM, Oleg Sobolev wrote:<br>
    </div>
    <blockquote
cite="mid:CADd3otH+yxNMCtJ7_1FcW75qCEEXky1uS3=7qJmR60ga00PC9g@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Nicholas,
        <div><br>
        </div>
        <div>Please find the script for searching contacts attached. It
          reads in .pdb file (file name is passed through command-line
          arg) and prints out symmetry contacts with some additional
          info. Hopefully this will help, or feel free to ask more
          questions. I believe that you have already read this
          description of the machinery you are trying to use:�</div>
        <div><br>
        </div>
        <div><a moz-do-not-send="true"
            href="http://cci.lbl.gov/publications/download/iucrcompcomm_aug2004.pdf">http://cci.lbl.gov/publications/download/iucrcompcomm_aug2004.pdf</a><br>
        </div>
        <div><br>
        </div>
        <div>Best regards,</div>
        <div>Oleg Sobolev.</div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Apr 7, 2015 at 9:33 AM, <span
            dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:markus.gerstel@diamond.ac.uk" target="_blank">markus.gerstel@diamond.ac.uk</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div link="blue" vlink="purple" lang="EN-GB">
              <div>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Dear
                    Nicholas,</span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">�</span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">I
                    found the CCP4 program ncont to be the easiest way
                    to identify crystal contacts.<a
                      moz-do-not-send="true"
                      name="14c94bb5ae4a3f3b__MailEndCompose"></a></span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">�</span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">If
                    you�re interested in a completed unit cell I have a
                    PDBCUR/PDBSET script somewhere, which might provide
                    a useful starting point.</span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">�</span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">I
                    have tried using cctbx a couple of years back to
                    compute either of these, but got inconsistent
                    results. (Also at that time I didn�t really know
                    what I�m doing. Which may still be true.) </span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">�</span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">-Markus</span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">�</span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">�</span></p>
                <div>
                  <div style="border:none;border-top:solid #b5c4df
                    1.0pt;padding:3.0pt 0cm 0cm 0cm">
                    <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"
                          lang="EN-US">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"
                        lang="EN-US"> <a moz-do-not-send="true"
                          href="mailto:cctbxbb-bounces@phenix-online.org"
                          target="_blank">cctbxbb-bounces@phenix-online.org</a>
                        [mailto:<a moz-do-not-send="true"
                          href="mailto:cctbxbb-bounces@phenix-online.org"
                          target="_blank">cctbxbb-bounces@phenix-online.org</a>]
                        <b>On Behalf Of </b>Nicholas Pearce<br>
                        <b>Sent:</b> 07 April 2015 17:26<br>
                        <b>To:</b> <a moz-do-not-send="true"
                          href="mailto:cctbxbb@phenix-online.org"
                          target="_blank">cctbxbb@phenix-online.org</a><br>
                        <b>Subject:</b> [cctbxbb] Generating crystal
                        copies</span></p>
                  </div>
                </div>
                <div>
                  <div class="h5">
                    <p class="MsoNormal">�</p>
                    <div>
                      <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:black">Hi
                          Everyone,<br>
                          <br>
                          I'm currently trying to generate crystal
                          contacts/copies. What I want out at the end is
                          a list of symmetry operations to generate the
                          crystallographic copies that form contacts
                          with my input model.<br>
                          <br>
                          I've been using the asu_mappings object, but
                          I'm not sure I'm using the output correctly or
                          if it's the right thing to use.<br>
                          <br>
                          Code snippet used to calculate the mappings:<br>
                          <br>
                          �� # Extract the xray structure from the
                          reference hierarchy<br>
                          ��� ref_struc =
                          ref_hierarchy.extract_xray_structure(crystal_symmetry=crystal_symmetry)<br>
                          ��� <br>
                          ��� # Extract the mappings that will tell us
                          the adjacent symmetry copies<br>
                          ��� asu_mappings =
                          ref_struc.asu_mappings(buffer_thickness=5)<br>
                          <br>
                          ��� # Symmetry operations for each atom<br>
                          ��� mappings = asu_mappings.mappings()<br>
                          <br>
                          I printed out all of the mappings, as I
                          presumed the vast majority of the them would
                          be the identity, meaning that any non-identity
                          operations would be from atoms in the buffer
                          area I have defined. These non-identity
                          operations would presumably be the ones that
                          would generate the crystal contacts.<br>
                          <br>
                          However, a large number of the atoms only had
                          one mapping, which was not the identity - e.g.
                          asu_mappings.get_rt_mx(x).as_xyz() might give
                          '-x+1/2,-y+1/2,z-1/2' for an atom with only
                          one mapping.<br>
                          <br>
                          The effect of this is that the operations
                          given by this generate symmetry copies that do
                          not contact my input model in real space.<br>
                          <br>
                          I presume this means that asu_mappings is
                          mapping the atoms in my model to some other
                          arbitrary asu, as well as the atoms in the
                          buffer zone around it? Therefore the symmetry
                          operations given are for these mapped atoms?<br>
                          <br>
                          Can anyone help, or suggest an alternative way
                          to generate the crystal contacts?<br>
                          <br>
                          Thanks,<br>
                          Nick</span></p>
                    </div>
                  </div>
                </div>
              </div>
              <span class="HOEnZb"><font color="#888888">
                  <p align="justify">�</p>
                  <p align="justify">--�</p>
                  <p align="justify">This e-mail and any attachments may
                    contain confidential, copyright and or privileged
                    material, and are for the use of the intended
                    addressee only. If you are not the intended
                    addressee or an authorised recipient of the
                    addressee please notify us of receipt by returning
                    the e-mail and do not use, copy, retain, distribute
                    or disclose the information in or attached to the
                    e-mail.<br>
                    Any opinions expressed within this e-mail are those
                    of the individual and not necessarily of Diamond
                    Light Source Ltd. <br>
                    Diamond Light Source Ltd. cannot guarantee that this
                    e-mail or any attachments are free from viruses and
                    we cannot accept liability for any damage which you
                    may sustain as a result of software viruses which
                    may be transmitted in or with the message.<br>
                    Diamond Light Source Limited (company no. 4375679).
                    Registered in England and Wales with its registered
                    office at Diamond House, Harwell Science and
                    Innovation Campus, Didcot, Oxfordshire, OX11 0DE,
                    United Kingdom<br>
                    �</p>
                </font></span></div>
            <br>
            _______________________________________________<br>
            cctbxbb mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a><br>
            <a moz-do-not-send="true"
              href="http://phenix-online.org/mailman/listinfo/cctbxbb"
              target="_blank">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
cctbxbb mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a>
<a class="moz-txt-link-freetext" href="http://phenix-online.org/mailman/listinfo/cctbxbb">http://phenix-online.org/mailman/listinfo/cctbxbb</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>