Re: [ccp4bb] Question about small molecule crystallography

2020-06-13 Thread James Holton

It's not all that hard to exceed it with a protein crystal too.

A 50 um wide lysozyme crystal sitting in a 50x50um beam will scatter 
into a single spot up to:


I = 7e-14*flux*(F/mosaic)^2

Where I is in photons/s
flux is incident photons/s
mosaic is in deg
F is the structure factor of the relevant hkl in electrons.

This is the peak photon arrival rate when the hkl is exactly on the 
Ewald sphere.  So, if we have F=130, mosaic=0.02 deg (typical for room 
temp), and flux = 1e12 ph/s we expect a peak count rate of 3e6 ph/s.  If 
that is a 1-pixel spot, then it will exceed the maximum count rate of 
Pilatus2 and Eiger1 detectors (2e6 ph/s).  For lysozyme, 35% of all hkls 
to 2.0A have F > 130.


That said, the "instant retrigger" feature of Pilatus3 and Eiger2 does a 
much better job of correcting for this. Also, spots are usually larger 
than 1 pixel. I often advise room temperature collection with 1 deg 
images on my Pilatus3 because this allows us to run unattenuated. The 
error from the retrigger correction is significantly smaller than the 
error incurred by photons lost in the 1-2 ms gap between images on 
Pilatus.  This second error is all but eliminated by Eiger's much shoter 
read-out period, but only Eiger2 has an instant retrigger feature.


And no, Dectris didn't pay me to say that.

The long and short of it is that whenever you use a counting device your 
intensity data are fundamentally non-linear.  Instant retrigger is just 
one of the various things to try to correct the non-linearity.


How much impact does non-linearity have?  Surprisingly, not that much!  
As long as the non-linearity is uniform across the detector face the 
impact on the more popular data quality metrics is hard to detect if you 
don't know what you're looking for.  It is not hard to test this for 
yourself.  All you need to do is take your favorite dataset's images and 
run the pixels through some non-linear function.  I just tried this with 
a lysozyme dataset using what should be a horrible thing to do: 
new_pixel = 10*sqrt(old_pixel). After doing the same processing and 
refinement protocol both before (normal) and after sqrt-ing the pixel 
values I get:


stat  normal  sqrt-ed
Rwork   17.4  22.0
Rfree   21.7  25.4
CC1/2   99.8  97.6
dmin     1.47  1.55
ISa 15   315
low-res bin:
Rmeas4.7   8.8
I/SIGMA 32.1  32.8
CCano   5936

Ok. ISa is weird, and stats are generally poorer after making the data 
hugely non-linear, but not so poor as to make you suspect something so 
massively wrong with the data.  The anomalous signal is lower, but 
amazingly still there. I suspect this is because anomalous differences 
are relative differences and even wiht a non-linear detector small 
relative differences can still be measured. Food for thought I suppose.


Oh, and read-out noise also doesn't hurt resolution nearly as much as 
you might think.  You can also try this for yourself by adding random 
noise to your pixels, or by simply adding pure background images to your 
data images.  You have to add quite a lot of background before you start 
to notice its impact. This is especially true for poorly-diffracting 
crystals (high WilsonB factor) where the drop in intensity with 
increasing Bragg angle is very steep.  The spots just "shut off" over a 
very narrow range in resolution.  High background can shift the limit 
around in this narrow range, but not by much. Anomalous differences are 
even less sensitive to background than resolution.  This is because the 
"background" for anomalous differences is the spot photons themselves.


You don't believe me, do you?  Try it.  Use merge2cbf to add images 
together. You will find it in your XDS program directory.


-James Holton
MAD Scientist

On 6/8/2020 1:35 PM, Winter, Graeme (DLSLtd,RAL,LSCI) wrote:

Hi Jon

Ambiguous phrasing, perhaps - the detector has a maximum count rate, 
as events per second, and it is easy to exceed this with a good 
quality small molecule crystal on an undulator beamline thus under 
record the intensity of strong reflections


Best wishes Graeme

On 8 Jun 2020, at 20:55, bogba...@yahoo.co.uk 
 wrote:


Re: "it turns out to be very very easy to exceed the count rate where 
the detector electronics can keep up."


Sorry if this is obvious, but I take it you mean "_can't_" keep up?

Jon Cooper

On 4 Jun 2020 13:06, "Winter, Graeme (DLSLtd,RAL,LSCI)" 
mailto:graeme.win...@diamond.ac.uk>> wrote:


Dear All,

A small word of caution regarding chemical crystallography on an
MX-like beamline - if you have a bright source, a well
diffracting crystal and a pixel array detector it is perfectly
possible to lose counts in the strongest reflections without
noticing - certainly without going over the nominal detector
count limits if your mosaic spread is very small

At Diamond we faced this issue with i19, which is a dedicated
chemical crystallography beamline on an undulator source, with a

Re: [ccp4bb] visual mask editor - why

2020-06-13 Thread James Holton

Bernhard,

Sounds like you are plotting something similar to what I was tinkering 
with once.  A script you may find useful is this one:

https://bl831.als.lbl.gov/~jamesh/bin_stuff/map_func.com

I wrote this because although mapmask, maprot, etc have very useful 
functionalities I found I wanted additional features, such as dividing 
one map by another, or taking a square root.  These are important if you 
are trying to derive the "signal-to-noise ratio", for example.


 Once you have a map of rho/sigma(rho) you can convert that into a 
"pobability" by passing it through the "erf()" and "pow()" functions.  
This can be a good way of estimating the "probability something is 
there" or P(rho) for a given map voxel. Specifically:


P(rho) = 1-pow(erf(abs(rho/sigma(rho))/sqrt(2)),V/2/d^3)

where:
rho is the electron density map value (preferably from a Fo-Fc map)
sigma(rho) is the error on that voxel
V is the unit cell volume (A^3)
d is the resolution in A
erf() is called the "error function"
pow(m,e) is the raise-to-a-power function: m^e

The erf() function by itself turns a rho/sigma(rho)=3 peak into 0.997, 
and a 1-sigma peak into 0.683. What that means is: assuming the noise is 
Gaussian, you expect voxels in the range -1-sigma to +1-sigma to be 
~68.3% of the total.  The "probability it isn't noise" (sometimes called 
a "p-value") is then 1-0.683 = 0.32.  Seems like a pretty high 
probability to give to a 1-sigma peak, but now remember that the map is 
not just a single observation but thousands.  So, the question you 
really want to ask is: if I generate 100x100x100 = 1e6 Gaussian-random 
numbers, what are the odds that a 4-sigma peak occurred at random?  The 
answer is: pretty much garanteed.  In any collection of 1 million 
Gaussian-random numbers with rms=1 it is virtually impossible to not 
have at least one of them > 4. Trust me, I have tried. This is where the 
"pow()" function comes in.  You need to multiply all the individual 
voxel probabilities together to get the probability of at least one 
>4-sigma peak happening at random.


But, then again, map voxels are hardly independent observations. Finite 
resolution means that neighboring pixels are highly correlated.  So, 
rather than map grid points, we should be considering "Shannon voxels".  
All this is is the number of blobs of diameter d, where d is the 
resolution, that can fit into the volume of the map. For example, if we 
have a 100 A edge on a cubic cell and 3 A resolution, then we have about 
3.7e4 independent "observations" of density, so the probability of a 
random 4-sigma peak is:

P(rho) = erf(4/sqrt(2))**(((100./3)**3)/2) = 0.31

That is, if you make a zillion maps of random data using different seeds 
each time, 3.7e4 voxels each, and draw from a Gaussian distribution with 
rms=1, you expect 31% of these maps to have a 4-sigma peak. Randomly. 
The other 69% will not have anything > 4.  So, if you see a 4-sigma peak 
in a map with 3.7e4 Shannon voxels I'd say it is real about 69% of the 
time.  You might consider 0.69 to be a decent "weight" you should give 
such a 4-sigma peak.  A 5-sigma peak under the same circumstances gets 
P(rho) = 0.989, and a 3-sigma peak gets P(rho) = 1e-22.  aka: probaby 
noise.  It is perhaps worth remembering that at a given resolution 
large-sigma noise peaks are more common in bigger cells than small ones.


So, how do you get sigma(rho)?  To be honest, the rms value of the 
mFo-DFc map is a pretty good estimate.  The rms value of the 2mFo-DFc 
map is not (Lang et al. PNAS 2013).  I usually get sigma(rho) 
empirically.  That is, by making a stack of maps: start with your 
favorite refined structure and introduce random noise from whatever 
source you want to test. I.E. Gaussian error proprotional to SigI is an 
obvious one.  A more realistic on is the Fo-Fc difference itself.  After 
adding this "extra" noise to the data, re-refine the structure and 
generate a 2mFo-DFc map.  Do this ~50 times with different random number 
seeds. Then take those 50 maps and compute the mean and standard 
deviation of "rho" at every voxel.  You can do this with mapmask's ADD, 
MULT and SCALE features, but you can't do the last step, which is taking 
the square root of the variance.  Hence: map_func.com


There are lots of other functions supported, including random number 
genration, etc.  Run the script with no arguments to get a list.


Oh, but don't try it on an mtz file!  mtz files are not maps.

-James Holton
MAD Scientist


On 5/28/2020 12:11 PM, Bernhard Rupp wrote:


Yes I have already pilfered useful parts of it in the scripts…

Thx, BR

*From:* Boaz Shaanan 
*Sent:* Thursday, May 28, 2020 11:59
*To:* b...@hofkristallamt.org
*Cc:* CCP4BB@JISCMAIL.AC.UK
*Subject:* Re: [ccp4bb] visual mask editor - why

Hi Bernhard,

Did you consider trying 'polder' in the phenix package?

Boaz

Boaz Shaanan, Ph.D.
Department of Life Sciences
Ben Gurion University of the Negev
Beer Sheva
Israel

On May 28, 2020 21:17, 

[ccp4bb] Macports and Fink - failed building open source pymol on MacOS Catalina

2020-06-13 Thread Javier Gonzalez
Hello,
I'm attempting to build pymol on a laptop running MacOS Catalina 10.15.5,
Processor 2.8GHz Quad-Core Intel i7, Graphics Intel Iris Pro 1536 MB
I downloaded the latest version of Xcode 11.1

I tried from Fink (fink install pymol-py27) and Macports (sudo port install
pymol), as indicated here: https://pymolwiki.org/index.php/MAC_Install

Both scripts run to download all dependencies but at the end fail with
different messages (see below). Any ideas? Is it doable or am I just
following outdated instructions?
Thanks in advance!
Javier

Fink: fails at compiling term-readkey-pm5184-2.37-1
-
-
Failed: phase compiling: term-readkey-pm5184-2.37-1 failed

Before reporting any errors, please run "fink selfupdate" and try again.
Also try using "fink configure" to set your maximum build jobs to 1 and
attempt to build the package again.
If you continue to have issues, please check to see if the FAQ on Fink's
website solves the problem.  If not, ask on one (not both, please) of
these mailing lists:

The Fink Users List 
The Fink Beginners List ,

with a carbon copy to the maintainer:

Christian Schaffner 

Note that this is preferable to emailing just the maintainer directly,
since most fink package maintainers do not have access to all possible
hardware and software configurations.

Please try to include the complete error message in your report.  This
generally consists of a compiler line starting with e.g. "gcc" or "g++"
followed by the actual error output from the compiler.

Also include the following system information:
Package manager version: 0.45.1
Distribution version: selfupdate-rsync Fri Jun 12 21:49:17 2020, 10.15,
x86_64
Trees: local/main stable/main
Xcode.app: 11.5
Xcode command-line tools: 11.5.0.0.1.1588476445
Max. Fink build jobs:  8
-
-
Macports: apparently there is an issue with py38-pyqt5
--->  Computing dependencies for pymol
The following dependencies will be installed:  py38-pyqt5
Continue? [Y/n]:
--->  Fetching archive for py38-pyqt5
--->  Attempting to fetch py38-pyqt5-5.14.2_0.darwin_19.x86_64.tbz2 from
https://packages.macports.org/py38-pyqt5
--->  Attempting to fetch py38-pyqt5-5.14.2_0.darwin_19.x86_64.tbz2 from
http://aus.us.packages.macports.org/macports/packages/py38-pyqt5
--->  Attempting to fetch py38-pyqt5-5.14.2_0.darwin_19.x86_64.tbz2 from
https://ywg.ca.packages.macports.org/mirror/macports/packages/py38-pyqt5
--->  Building py38-pyqt5
Error: Failed to build py38-pyqt5: command execution failed
Error: See
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-pyqt5/py38-pyqt5/main.log
for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port pymol failed
-
-
-- 
Dr. Javier M. González
Instituto de Bionanotecnología del NOA (INBIONATEC-CONICET)
Universidad Nacional de Santiago del Estero (UNSE)
RN9, Km 1125. Villa El Zanjón. (G4206XCP)
Santiago del Estero. Argentina
Tel: +54-(0385)-4238352



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB=1

This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/


Re: [ccp4bb] Ligand building

2020-06-13 Thread Barone, Matthias
Hi Hari

If I understood you correctly, you want to modify and subsequently dock it onto 
a complex structure, right? For me, the following workflow turned out to be 
most straightfwd:

- build it in MOLOC (http://www.moloc.ch/). It lets you very easily modify an 
existing molecule without the need of a restraint file, or build a ligand from 
scratch. Adding atoms, change their H-counts, chirality, or adding bonds 
between two atoms is rather fast. Minimize the molecule either in vacuum or 
dock it right there on its substrate. If you need coot later on, store a pdb 
file and

- create the restraints file via prodrg server 
(http://prodrg1.dyndns.org/submit.html). Its up to you to disable EM at this 
point to retain the conformation of your molecule

- pre-load the cif file in coot and then load the pdb file that comes along 
with the prodrg run (prodrg might change atom names, so work with its outputs 
from now on)


If you need help in moloc, send me a message. Its not a WYSIWYG layout but has 
some big advantages over coot in terms of picking and moving single chains, 
fragments or group of atoms.

cheers,

Matthias


Dr. Matthias Barone

AG Kuehne, Rational Drug Design

Leibniz-Forschungsinstitut für Molekulare Pharmakologie (FMP)
Robert-Rössle-Strasse 10
13125 Berlin

Germany
Phone: +49 (0)30 94793-284


From: CCP4 bulletin board  on behalf of Hari shankar 
<465d10db143e-dmarc-requ...@jiscmail.ac.uk>
Sent: Saturday, June 13, 2020 6:50:51 PM
To: CCP4BB@JISCMAIL.AC.UK
Subject: [ccp4bb] Ligand building

Hi all,

I want to build a ligand that does not exist in reality (or be able to modify 
an existing ligand as per choice).
1. JLigand in the ccp4 suite seems to work only on java and gives me an 
“configuration problem” as an error message on my Windows. I am new to this and 
unaware of how to solve this issue. Could I get some suggestions on how to 
start this?

2. Alternatively, I was trying to use eLBOW from phenix but it seems to only 
build ligands but unable to delete atoms. Is there another program or option 
for me to delete sections of the ligand and geometrical optimise them in phenix?

Thanks
Hari



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB=1



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB=1

This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/


Re: [ccp4bb] Ligand building

2020-06-13 Thread Tomas Malinauskas
Hi Hari,

I typically draw formulae using ChemDraw online, export SMILES and use
them to get PDBs/CIFs from Grade web server (Global Phasing). Both
ChemDraw and Grade web servers are free to use.

Hope that helps,
Tomas

On Sat, Jun 13, 2020 at 6:01 PM Hari shankar
<465d10db143e-dmarc-requ...@jiscmail.ac.uk> wrote:
>
> Hi all,
>
> I want to build a ligand that does not exist in reality (or be able to modify 
> an existing ligand as per choice).
> 1. JLigand in the ccp4 suite seems to work only on java and gives me an 
> “configuration problem” as an error message on my Windows. I am new to this 
> and unaware of how to solve this issue. Could I get some suggestions on how 
> to start this?
>
> 2. Alternatively, I was trying to use eLBOW from phenix but it seems to only 
> build ligands but unable to delete atoms. Is there another program or option 
> for me to delete sections of the ligand and geometrical optimise them in 
> phenix?
>
> Thanks
> Hari
>
> 
>
> To unsubscribe from the CCP4BB list, click the following link:
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB=1



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB=1

This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/


Re: [ccp4bb] Ligand building

2020-06-13 Thread Paul Emsley

On 13/06/2020 18:16, Paul Emsley wrote:

On 13/06/2020 17:50, Hari shankar wrote:



I want to build a ligand that does not exist in reality (or be able 
to modify an existing ligand as per choice).
1. JLigand in the ccp4 suite seems to work only on java and gives me 
an “configuration problem” as an error message on my Windows. I am 
new to this and unaware of how to solve this issue. Could I get some 
suggestions on how to start this?




In CCP4i2: Task menu -> Ligands -> Make Ligand -> New Job -> Run -> 
{sketch} -> Close the window




that should be:

Task menu -> Ligands -> Make Ligand -> New Job -> Run -> {sketch} -> 
Apply -> Close the window




To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB=1

This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/


Re: [ccp4bb] Ligand building

2020-06-13 Thread Paul Emsley

On 13/06/2020 17:50, Hari shankar wrote:



I want to build a ligand that does not exist in reality (or be able to 
modify an existing ligand as per choice).
1. JLigand in the ccp4 suite seems to work only on java and gives me 
an “configuration problem” as an error message on my Windows. I am new 
to this and unaware of how to solve this issue. Could I get some 
suggestions on how to start this?




In CCP4i2: Task menu -> Ligands -> Make Ligand -> New Job -> Run -> 
{sketch} -> Close the window


In Coot: Calculate -> Ligand Builder -> {sketch} -> Apply

You can use File -> Fetch Molecule... or File -> Import Molecule... to 
either fetch (from the aether) or import (from a mmcif file in the 
monomer library) a previously described molecule.




To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB=1

This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/


[ccp4bb] Ligand building

2020-06-13 Thread Hari shankar
Hi all,
I want to build a ligand that does not exist in reality (or be able to modify 
an existing ligand as per choice). 1. JLigand in the ccp4 suite seems to work 
only on java and gives me an “configuration problem” as an error message on my 
Windows. I am new to this and unaware of how to solve this issue. Could I get 
some suggestions on how to start this?
2. Alternatively, I was trying to use eLBOW from phenix but it seems to only 
build ligands but unable to delete atoms. Is there another program or option 
for me to delete sections of the ligand and geometrical optimise them in 
phenix? 
ThanksHari



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB=1

This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/


[ccp4bb] Job: Data Scientist – Structural Bioinformatics – Cambridge UK

2020-06-13 Thread Daphne Truan
Hi All,

We are hiring! We are seeking a highly motivated and skilled (Senior) Scientist 
with experience in software engineering, biostatistical analysis and data 
modelling to join Lonza's Applied Protein Services (APS) Bioinformatics team 
based in Cambridge, UK.

To apply:
https://www.lonza.com/jobs/R21897

Daphne

Daphné Truan, PhD
Bioinformatics Group Leader
Gonville Building (B200)
Chesterford Research Park
CB10 1XL Cambridge
United Kingdom
www.lonza.com



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB=1

This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/