Re: [ccp4bb] Off-topic: Best Scripting Language

2012-09-13 Thread William G. Scott
I'd just use a decent shell scripting language (like zsh) in conjunction with a 
unix tool like awk.  But the gnuplot option sounds ideal.

Bill


William G. Scott
Professor
Department of Chemistry and Biochemistry
and The Center for the Molecular Biology of RNA
228 Sinsheimer Laboratories
University of California at Santa Cruz
Santa Cruz, California 95064
USA


On Sep 12, 2012, at 7:32 AM, Jacob Keller j-kell...@fsm.northwestern.edu 
wrote:

 Dear List,
 
 since this probably comes up a lot in manipulation of pdb/reflection files 
 and so on, I was curious what people thought would be the best language for 
 the following: I have some huge (100s MB) tables of tab-delimited data on 
 which I would like to do some math (averaging, sigmas, simple arithmetic, 
 etc) as well as some sorting and rejecting. It can be done in Excel, but this 
 is exceedingly slow even in 64-bit, so I am looking to do it through some 
 scripting. Just as an example, a sort which takes 10 min in Excel takes 
 ~10 sec max with the unix command sort (seems crazy, no?). Any suggestions?
 
 Thanks, and sorry for being off-topic,
 
 Jacob
 
 -- 
 ***
 Jacob Pearson Keller
 Northwestern University
 Medical Scientist Training Program
 email: j-kell...@northwestern.edu
 ***


Re: [ccp4bb] Ligand geometry obs. vs. ideal

2012-09-13 Thread Robert Nicholls
In case it helps… After you've done unrestrained refinement, you can use 
prosmart to generate external self-restraints to the current conformation 
(using the -self_restrain keyword). This is flexible - you can specify residue 
ranges, and it works for protein, ligand, DNA/RNA, waters, etc. These external 
restraints will attempt to maintain the original relative conformation 
throughout refinement. If you want any help doing this, feel free to email me 
off-board.

Cheers,
Rob


On 12 Sep 2012, at 21:11, Edwin Pozharski wrote:

 You can do unrestrained refinement in refmac, at your resolution it may be 
 OK.   If you want to keep protein restrained, you can either use harmonic 
 restraints or come up with a special cif-file for your ligand with large esd 
 targets.  There is no direct way to tell refmac to exclude specific residue 
 from restraints, at least to my knowledge.
 
 Cheers,
 
 Ed.
 
 On 09/12/2012 02:44 PM, Yuri Pompeu wrote:
 What is the best way to refine the ligand unrestrained and then generate 
 measurements?


Re: [ccp4bb] Aimless and Pointless

2012-09-13 Thread A Leslie


It is possible to force Pointless to select a particular solution,  
using the Find or match Laue group option in CCP4i. The default  
option here is Determine Laue group but if you select the Choose a  
previous solution checkbox you can specify the solution you want  
Pointless to select, by Space group name, Laue group name or Laue  
group solution number (from a previous run).


You can do the same with the Symmetry, Scale, Merge (Aimless) if you  
check the tickbox Customise symmetry determination and then Choose  
a previous solution.


In cases of pseudosymmetry it is sometimes necessary to override the  
solution Pointless thinks is best.


Andrew



On 12 Sep 2012, at 23:41, Cosmo Z Buffalo wrote:


Hi all,

I am currently trying to perform a quickscale in iMosflm 7.0.9 after  
I integrate in an R 32 space group.  Unfortunately, both Pointless  
and Aimless are both giving me a best solution space group of P 43 3  
2.  After analyzing the statistics, this cannot be correct.  Other  
programs such as HKL2000 have confirmed this to be true.  So my  
question: is it possible to force Aimless and Pointless to generate  
statistics in a space group other than the one it predicts?  And if  
so, how would I do this?


-Cosmo




Re: [ccp4bb] Ligand geometry obs. vs. ideal

2012-09-13 Thread Tim Gruene
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dear Yuri,

at 1.18A resolution you can also refine using shelxl. It's basically
your choice on a per-atom-basis what properties you wish to restrain
and which to leave unrestrained.

With L.S. refinement and given enough RAM it can print esds of your
coordinates to its log file from which you can calculate all
properties you mention - some of these might already be in the
log-file itself.

Cheers,
Tim

On 09/12/2012 08:44 PM, Yuri Pompeu wrote:
 Hi everyone, I am trying to show that a ligand underwent catalysis
 during a soaking experiment. One of the things I would like to show
 is the geometry of the ligand, bond angles/lengths, dihedrals,
 etc... One of my models has a hi-res of 1.18A and the ligand
 density is really clear and complete. What is the best way to
 refine the ligand unrestrained and then generate measurements? 
 Also, the idea is to finally compare to ideal geometry. How should
 I generate these values (any softwares in mind)? ANy idea is
 welcome. Thanks a lot
 

- -- 
- --
Dr Tim Gruene
Institut fuer anorganische Chemie
Tammannstr. 4
D-37077 Goettingen

GPG Key ID = A46BEE1A

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFQUak9UxlJ7aRr7hoRApdnAJ0SvhnucqonoCCrwaYMXaNeYlRPXACeJdyz
qxDduM1vcxPCMYOmtkIOtkY=
=Wt7O
-END PGP SIGNATURE-


Re: [ccp4bb] Ligand geometry obs. vs. ideal

2012-09-13 Thread Patel, Joe
Hi Yuri,

If you have access to mogul you can get an understanding of what your geometry 
should be based on the small molecule database.  Of course not everything is 
well represented so if your ligand is unusual this will flag up in lower 
statistical significance.

Mogul will allow you to understand how far you are from ideal.

Not really sure if this is what you might be after

Joe P


--
AstraZeneca UK Limited is a company incorporated in England and Wales with 
registered number: 03674842 and a registered office at 2 Kingdom Street, 
London, W2 6BD.
Confidentiality Notice: This message is private and may contain confidential, 
proprietary and legally privileged information. If you have received this 
message in error, please notify us and remove it from your system and note that 
you must not copy, distribute or take any action in reliance on it. Any 
unauthorised use or disclosure of the contents of this message is not permitted 
and may be unlawful.
Disclaimer: Email messages may be subject to delays, interception, non-delivery 
and unauthorised alterations. Therefore, information expressed in this message 
is not given or endorsed by AstraZeneca UK Limited unless otherwise notified by 
an authorised representative independent of this message. No contractual 
relationship is created by this message by any person unless specifically 
indicated by agreement in writing other than email.
Monitoring: AstraZeneca UK Limited may monitor email traffic data and content 
for the purposes of the prevention and detection of crime, ensuring the 
security of our computer systems and checking Compliance with our Code of 
Conduct and Policies.
-Original Message-
From: CCP4 bulletin board [mailto:CCP4BB@JISCMAIL.AC.UK] On Behalf Of Yuri 
Pompeu
Sent: 12 September 2012 19:45
To: CCP4BB@JISCMAIL.AC.UK
Subject: [ccp4bb] Ligand geometry obs. vs. ideal

Hi everyone,
I am trying to show that a ligand underwent catalysis during a soaking 
experiment.
One of the things I would like to show is the geometry of the ligand, bond 
angles/lengths, dihedrals, etc...
One of my models has a hi-res of 1.18A and the ligand density is really clear 
and complete.
What is the best way to refine the ligand unrestrained and then generate 
measurements?
Also, the idea is to finally compare to ideal geometry. How should I generate 
these values (any softwares in mind)?
ANy idea is welcome.
Thanks a lot


Re: [ccp4bb] Off-topic: Best Scripting Language

2012-09-13 Thread Soisson, Stephen M
After this religious debate concludes, I propose we return to the old standby - 
vi versus emacs. 

-Original Message-
From: CCP4 bulletin board [mailto:CCP4BB@JISCMAIL.AC.UK] On Behalf Of Tim Gruene
Sent: Thursday, September 13, 2012 5:25 AM
To: CCP4BB@JISCMAIL.AC.UK
Subject: Re: [ccp4bb] Off-topic: Best Scripting Language

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi James,

I don't read blaming in George's words, just reasoning for a
personal decision.

Maybe I suffer from similar prejudice: I have the impression that
python programmers spend a lot of effort in trying to convince others
that python is a good choice. Why bother rather than let people make
their own decision?

Cheers,
Tim

On 09/12/2012 09:49 PM, James Stroud wrote:
 
 On Sep 12, 2012, at 1:00 PM, George Sheldrick wrote:
 
 It is the lack of compatibility between different versions 
 mentioned by Ethan that really put me off learning PYTHON.
 
 
 Python is backwards compatible. I have reams of code I wrote in 
 python 2.3 that still works in 2.7 without modification.
 
 Also, python (aka python 2) and python 3000 (aka python 3) are 
 considered two different languages. It's not reasonable to
 consider them one language and then complain that they are
 incompatible. Python 3 was created as a new language (and should be
 treated as such) precisely because it breaks compatibility with
 python 2. That was the intent of the language authors.
 
 You blame the authors for recognizing limitations of a language
 and inventing a new one to overcome those limitations.
 
 If the FORTRAN authors would have done that about 30 years ago, we 
 all might be programming in FORTRAN.
 
 James
 
 

- -- 
- --
Dr Tim Gruene
Institut fuer anorganische Chemie
Tammannstr. 4
D-37077 Goettingen

GPG Key ID = A46BEE1A

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFQUaZRUxlJ7aRr7hoRAimoAJwPAw1o0VqugVERQcYN0RBR424mYgCgu8mF
cwGd1+0swzfudjmf0pgu0ek=
=NIVw
-END PGP SIGNATURE-
Notice:  This e-mail message, together with any attachments, contains
information of Merck  Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates Direct contact information
for affiliates is available at 
http://www.merck.com/contact/contacts.html) that may be confidential,
proprietary copyrighted and/or legally privileged. It is intended solely
for the use of the individual or entity named on this message. If you are
not the intended recipient, and have received this message in error,
please notify us immediately by reply e-mail and then delete it from 
your system.


[ccp4bb] Off Topic: Maltose Binding Protein Purification

2012-09-13 Thread Scott Pegan
CCP4,

I will be doing some MBP fusion purification in the near future and I was
wondering if anyone knew what the most cost effective MBP trapping resin to
use.  So, far I have seen the following two products, are there any others
I should consider?

GE* Healthcare MBPTrap HP ColumnsNew England Amylose Resin High Flow


Scott

-- 
Scott D. Pegan, Ph.D.
Assistant Professor
Chemistry  Biochemistry
University of Denver
Office: 303 871 2533
Fax: 303 871 2254


[ccp4bb] Postdoc Position in Grenoble, France

2012-09-13 Thread prenesto

 Dear Colleagues,
Please find attached announcement about a postdoc position at the UVHCI, 
Grenoble.Could You please communicate to anybody who might be interested?

Thanks in advance!
Best regards,
Patricia


*Patricia Renesto, PhD
UVHCI UMI 3265 CNRS-UJF-EMBL
 6, rue Jules Horowitz
38042 Grenoble, France
04 76 20 94 04*




POSTDOCTORAL POSITION_UVHCI.pdf
Description: Adobe PDF document


Re: [ccp4bb] Off-topic: Best Scripting Language

2012-09-13 Thread James Stroud

On Sep 13, 2012, at 3:24 AM, Tim Gruene wrote:
 I have the impression that
 python programmers spend a lot of effort in trying to convince others
 that python is a good choice. Why bother rather than let people make
 their own decision?


Someone asked.

Plus, python programmers put no more effort than any other programmer. It's 
just that python has more advocates (for good reason) so the apparent effort is 
amplified.

Don't hate us because our preferred programming language is beautiful.

James

--
James Stroud

http://www.jamesstroud.com



Re: [ccp4bb] Off-topic: Best Scripting Language

2012-09-13 Thread Patrick Shaw Stewart
Like most computer users and many scientists I don't write scripts to
organize or analyse my data unless I get desperate.  I've used both Python
and Perl a few years ago, but it would take quite a lot of time and effort
and staring at on-line tutorials to get back into either of them right now.
 So I end up using massive Excel files that kind of work, but are a pain.
 I've noticed that quite a few structural biologists have the same problem.

I've never understood why there can't be a simple programming language that
is completely self-explanatory bercause it uses English sentences.  Our
robot scripting language uses syntax like

Dispense 0.5 * DropVol ul to TargetWells using ProteinSyringe

That is pretty obvious.


So why can't I have a language where I can write


Carry_out_a_sequence_where

x is 1 to 10

with_step_size 1 :

if
age of person(x) is_greater_than 50
then
print name of person(x) is an old man (or woman) .

Repeat_for_next x .


?


I don't care if it's efficient (anything is efficient compared to Excel) or
if it's easy to write big programs in.  All I care about is that it's easy
to get going.

Later on I can learn to write simply Sequence instead of
Carry_out_a_sequence_where.  I could click a button that would make the
replacement to make my code more compact and readable to a trained eye.
 And of course  is_greater_than  could be written as   .

Any intelligent school-child could understand it too, which would be
fantastic here in the UK where kids aren't taught to program any more.

Does such a language exist?





On 13 September 2012 17:08, James Stroud xtald...@gmail.com wrote:


 On Sep 13, 2012, at 3:24 AM, Tim Gruene wrote:

 I have the impression that
 python programmers spend a lot of effort in trying to convince others
 that python is a good choice. Why bother rather than let people make
 their own decision?


 Someone asked.

 Plus, python programmers put no more effort than any other programmer.
 It's just that python has more advocates (for good reason) so the apparent
 effort is amplified.

 Don't hate us because our preferred programming language is beautiful.

 James

 --
 James Stroud

 http://www.jamesstroud.com




-- 
 patr...@douglas.co.ukDouglas Instruments Ltd.
 Douglas House, East Garston, Hungerford, Berkshire, RG17 7HD, UK
 Directors: Peter Baldock, Patrick Shaw Stewart

 http://www.douglas.co.uk
 Tel: 44 (0) 148-864-9090US toll-free 1-877-225-2034
 Regd. England 2177994, VAT Reg. GB 480 7371 36


Re: [ccp4bb] Off-topic: Best Scripting Language

2012-09-13 Thread Richard Gildea
In my opinion, the Python equivalent of your pseudo-code is fairly close to
how you would write the instructions logically. But then maybe not everyone
thinks in the same way that I do :-)

for x in range(1, 10):
  if age_of_person(x)  50:
print name_of_person(x), is an old man (or woman)

Of course you would have to define the functions age_of_person() and
name_of_person() in order for this to work, or you could write it in a more
object-oriented method so you have a Person object which has attributes
name, age, gender, etc. and the code would be even more readable.

for person in list_of_people:
  if person.age  50:
print person.name, is an old , person.gender

Disclaimer: I mainly write in Python, so obviously am naturally biased
towards Python, however I have yet to see another widely used language that
is as readable or intuitive to learn (to me).

Cheers,

Richard

--

Richard Gildea

Software Developer
Physical Biosciences Division
Lawrence Berkeley National Laboratory
1 Cyclotron Rd
Mail Stop 64R0121
Berkeley
CA 94720-8118



On 13 September 2012 10:02, Patrick Shaw Stewart patr...@douglas.co.ukwrote:


 Like most computer users and many scientists I don't write scripts to
 organize or analyse my data unless I get desperate.  I've used both Python
 and Perl a few years ago, but it would take quite a lot of time and effort
 and staring at on-line tutorials to get back into either of them right now.
  So I end up using massive Excel files that kind of work, but are a pain.
  I've noticed that quite a few structural biologists have the same problem.

 I've never understood why there can't be a simple programming language
 that is completely self-explanatory bercause it uses English sentences.
  Our robot scripting language uses syntax like

 Dispense 0.5 * DropVol ul to TargetWells using ProteinSyringe

 That is pretty obvious.


 So why can't I have a language where I can write


 Carry_out_a_sequence_where

  x is 1 to 10

 with_step_size 1 :

 if
 age of person(x) is_greater_than 50
  then
 print name of person(x) is an old man (or woman) .

 Repeat_for_next x .


 ?


 I don't care if it's efficient (anything is efficient compared to Excel)
 or if it's easy to write big programs in.  All I care about is that it's
 easy to get going.

 Later on I can learn to write simply Sequence instead of
 Carry_out_a_sequence_where.  I could click a button that would make the
 replacement to make my code more compact and readable to a trained eye.
  And of course  is_greater_than  could be written as   .

 Any intelligent school-child could understand it too, which would be
 fantastic here in the UK where kids aren't taught to program any more.

 Does such a language exist?





 On 13 September 2012 17:08, James Stroud xtald...@gmail.com wrote:


 On Sep 13, 2012, at 3:24 AM, Tim Gruene wrote:

 I have the impression that
 python programmers spend a lot of effort in trying to convince others
 that python is a good choice. Why bother rather than let people make
 their own decision?


 Someone asked.

 Plus, python programmers put no more effort than any other programmer.
 It's just that python has more advocates (for good reason) so the apparent
 effort is amplified.

 Don't hate us because our preferred programming language is beautiful.

 James

   --
 James Stroud

 http://www.jamesstroud.com




 --
  patr...@douglas.co.ukDouglas Instruments Ltd.
  Douglas House, East Garston, Hungerford, Berkshire, RG17 7HD, UK
  Directors: Peter Baldock, Patrick Shaw Stewart

  http://www.douglas.co.uk
  Tel: 44 (0) 148-864-9090US toll-free 1-877-225-2034
  Regd. England 2177994, VAT Reg. GB 480 7371 36




Re: [ccp4bb] Off-topic: Best Scripting Language

2012-09-13 Thread James Stroud
On Sep 13, 2012, at 11:02 AM, Patrick Shaw Stewart wrote:
 Like most computer users and many scientists I don't write scripts to 
 organize or analyse my data unless I get desperate.  I've used both Python 
 and Perl a few years ago, but it would take quite a lot of time and effort 
 and staring at on-line tutorials to get back into either of them right now.  
 So I end up using massive Excel files that kind of work, but are a pain.  
 I've noticed that quite a few structural biologists have the same problem.
 
 I've never understood why there can't be a simple programming language that 
 is completely self-explanatory bercause it uses English sentences.

Yeah. They tried that. It's called AppleScript and is a complete disaster for 
programmers simply because of its vague resemblance to natural language. There 
are essays on this issue [1, 2], but other than the message stay away from 
programming languages that try to be natural languages, these essays are 
mostly academic.

It turns out that the syntax and semantics of all reasonable programming 
languages are very similar, or fall into only a few classes (e.g. C-like, 
S-expressions, etc.), so once you are fluent in one from a class, it's easy 
to pick up the others. This can't be said of natural languages, which are full 
of idioms and grammatical exceptions, even in closely related dialects.

James


[1] 
http://www.codinghorror.com/blog/2006/08/computer-languages-arent-human-languages.html
[2] http://daringfireball.net/2005/09/englishlikeness_monster

Re: [ccp4bb] Off-topic: Best Scripting Language

2012-09-13 Thread Jacob Keller

 It turns out that the syntax and semantics of all reasonable programming
 languages are very similar, or fall into only a few classes (e.g. C-like,
 S-expressions, etc.), so once you are fluent in one from a class, it's
 easy to pick up the others. This can't be said of natural languages, which
 are full of idioms and grammatical exceptions, even in closely related
 dialects.


This is more opinions than I can shake a stick at! Don't we all have other
fish to fry (or for the French, other cats to whip? Other national
equivalents?) Anyway, I was nervous as a long-tailed cat in a room full of
rocking chairs to ask this question, and look at the Pandora's box that
this has opened!

Java anyone?! I've actually noticed a bit of a dearth of Java in the
crystallography world, with some exceptions...

Thanks everybody for your suggestions--I will mull them over, since you all
make such good arguments (not meant in the programming sense, but probably
that's true too!),

Jacob





 James


 [1]
 http://www.codinghorror.com/blog/2006/08/computer-languages-arent-human-languages.html
 [2] http://daringfireball.net/2005/09/englishlikeness_monster




-- 
***
Jacob Pearson Keller
Northwestern University
Medical Scientist Training Program
email: j-kell...@northwestern.edu
***


[ccp4bb] Series termination effect calculation.

2012-09-13 Thread Niu Tou
Dear Colleagues,

I am trying to repeat a series termination effect calculation displayed as
figure 2 in a publihsed paper
(http://www.ncbi.nlm.nih.gov/pubmed/12215645). Formula
(1) was used to implement this calculation. Since f(s) is not defined in
detail in this paper, I used formula and parameters listed in another
paper (http://scripts.iucr.org/cgi-bin/paper?a05896) to calculate it.

However, the result I got is not consistent with figure 2 of the first
paper. I am not sure if the formulas I used are right or not. Or if there
is any problem in the MatLab code, which I list below:

###

clear all;clc;format compact;format long;



% matrix of a, b, c coefficients:

% rows: Fe, S, Fe1, Mo

% columns: A1; B1; A2; B2; A3; B3; A4; B4; C

fM = ...

[11.9185 4.87394 7.04848 0.34023 3.34326 15.9330 2.27228 79.0339 1.40818;...

 7.18742 1.43280 5.88671 0.02865 5.15858 22.1101 1.64403 55.4651
-3.87732;...

 11.9185 4.87394 7.04848 0.34023 3.34326 15.9330 2.27228 79.0339 1.40818;...

 19.3885 0.97877 11.8308 10.0885 3.75919 31.9738 1.46772 117.932 5.55047];



%%% store radius data:

% distance from: origin

% columns: Fe, S, Fe, Mo

R_el = [2.0 3.3 3.5 3.5];

RHO_t = zeros(4,400);

 for numel = 1:4

 EL = numel;

 RHO = zeros(1,400);

 dmax = zeros(1,400);

 for iter = 1:400

dmax(iter) = iter/100; % in angstroms

% numerical integration

 int_fun = @(s) 4*pi*(s.^2).* ...

(fM(EL,1).*exp(-fM(EL,2).*(s.^2)*0.25) + ...

 fM(EL,3).*exp(-fM(EL,4).*(s.^2)*0.25) + ...

 fM(EL,5).*exp(-fM(EL,6).*(s.^2)*0.25) + ...

 fM(EL,7).*exp(-fM(EL,8).*(s.^2)*0.25) + fM(EL,9)).* ...

 sin(2*pi*s*R_el(EL))./(2*pi*s*R_el(EL));



 RHO(iter) = quad(int_fun,0,1/dmax(iter));

clc;display(iter);display(numel);

 end

 RHO_t(numel,:) = RHO;

 end



RHO_t(1,:)= 6*RHO_t(1,:);

RHO_t(2,:)= 9*RHO_t(2,:);



 figure;

 axis([0.5 3.5 -10 10]); hold on;

 plot(dmax,RHO_t(1,:),...

  dmax,RHO_t(2,:),...

  dmax,RHO_t(3,:),...

  dmax,RHO_t(4,:),...

  dmax,sum(RHO_t,1));

  title('Electron Density Profile');

  legend('Fe','S','Fe1','Mo','Sum');

  xlabel('d_m_a_x'); ylabel('Rho(r)');

  set(gca,'XDir','reverse');

##



Any suggestions will be appreciated. Thanks!



Niu


Re: [ccp4bb] Series termination effect calculation.

2012-09-13 Thread Pavel Afonine
Hi,
pointers listed here may be of help:

1) CCP4 Newsletterhttp://www.ccp4.ac.uk/newsletters/newsletter42/content.html
On the Fourier series truncation peaks at subatomic resolution
Anne Bochow, Alexandre Urzhumtsev


2) https://www.phenix-online.org/presentations/latest/pavel_maps.pdf

3) Central Ligand in the FeMo-Cofactor Nitrogenase MoFe-Protein at 1.16 Å
Resolution: A.

Oliver Einsle, et al. Science, 1696 (2002) 297

4) Page 267 Figure 4:

On the possibility of the observation of valence electron density for
individual
bonds in proteins in conventional difference maps

P. V. Afonine, V. Y. Lunin, N. Muzet and A. Urzhumtsev
Acta Cryst. (2004). D60, 260-274


Pavel

On Thu, Sep 13, 2012 at 2:09 PM, Niu Tou niutou2...@gmail.com wrote:

 Dear Colleagues,

 I am trying to repeat a series termination effect calculation displayed as
 figure 2 in a publihsed paper (http://www.ncbi.nlm.nih.gov/pubmed/12215645). 
 Formula
 (1) was used to implement this calculation. Since f(s) is not defined in
 detail in this paper, I used formula and parameters listed in another
 paper (http://scripts.iucr.org/cgi-bin/paper?a05896) to calculate it.

 However, the result I got is not consistent with figure 2 of the first
 paper. I am not sure if the formulas I used are right or not. Or if there
 is any problem in the MatLab code, which I list below:

 ###

 clear all;clc;format compact;format long;



 % matrix of a, b, c coefficients:

 % rows: Fe, S, Fe1, Mo

 % columns: A1; B1; A2; B2; A3; B3; A4; B4; C

 fM = ...

 [11.9185 4.87394 7.04848 0.34023 3.34326 15.9330 2.27228 79.0339
 1.40818;...

  7.18742 1.43280 5.88671 0.02865 5.15858 22.1101 1.64403 55.4651
 -3.87732;...

  11.9185 4.87394 7.04848 0.34023 3.34326 15.9330 2.27228 79.0339
 1.40818;...

  19.3885 0.97877 11.8308 10.0885 3.75919 31.9738 1.46772 117.932 5.55047];



 %%% store radius data:

 % distance from: origin

 % columns: Fe, S, Fe, Mo

 R_el = [2.0 3.3 3.5 3.5];

 RHO_t = zeros(4,400);

  for numel = 1:4

  EL = numel;

  RHO = zeros(1,400);

  dmax = zeros(1,400);

  for iter = 1:400

 dmax(iter) = iter/100; % in angstroms

 % numerical integration

  int_fun = @(s) 4*pi*(s.^2).* ...

 (fM(EL,1).*exp(-fM(EL,2).*(s.^2)*0.25) + ...

  fM(EL,3).*exp(-fM(EL,4).*(s.^2)*0.25) + ...

  fM(EL,5).*exp(-fM(EL,6).*(s.^2)*0.25) + ...

  fM(EL,7).*exp(-fM(EL,8).*(s.^2)*0.25) + fM(EL,9)).* ...

  sin(2*pi*s*R_el(EL))./(2*pi*s*R_el(EL));



  RHO(iter) = quad(int_fun,0,1/dmax(iter));

 clc;display(iter);display(numel);

  end

  RHO_t(numel,:) = RHO;

  end



 RHO_t(1,:)= 6*RHO_t(1,:);

 RHO_t(2,:)= 9*RHO_t(2,:);



  figure;

  axis([0.5 3.5 -10 10]); hold on;

  plot(dmax,RHO_t(1,:),...

   dmax,RHO_t(2,:),...

   dmax,RHO_t(3,:),...

   dmax,RHO_t(4,:),...

   dmax,sum(RHO_t,1));

   title('Electron Density Profile');

   legend('Fe','S','Fe1','Mo','Sum');

   xlabel('d_m_a_x'); ylabel('Rho(r)');

   set(gca,'XDir','reverse');

 ##



 Any suggestions will be appreciated. Thanks!



 Niu



Re: [ccp4bb] Off-topic: Best Scripting Language

2012-09-13 Thread Eric Williams
Another option that could be cheap or free (if your university offers
license deals, as mine does) is SPSS. It has a lot of the quick and dirty
spreadsheet functionality of Excel, is much faster than Excel with large
tables, has lots of good analysis tools, has its own scripting language,
and is compatible with R and Python.

Eric

On Thu, Sep 13, 2012 at 2:21 PM, Jacob Keller 
j-kell...@fsm.northwestern.edu wrote:

 It turns out that the syntax and semantics of all reasonable programming
 languages are very similar, or fall into only a few classes (e.g. C-like,
 S-expressions, etc.), so once you are fluent in one from a class, it's
 easy to pick up the others. This can't be said of natural languages, which
 are full of idioms and grammatical exceptions, even in closely related
 dialects.


 This is more opinions than I can shake a stick at! Don't we all have other
 fish to fry (or for the French, other cats to whip? Other national
 equivalents?) Anyway, I was nervous as a long-tailed cat in a room full of
 rocking chairs to ask this question, and look at the Pandora's box that
 this has opened!

 Java anyone?! I've actually noticed a bit of a dearth of Java in the
 crystallography world, with some exceptions...

 Thanks everybody for your suggestions--I will mull them over, since you
 all make such good arguments (not meant in the programming sense, but
 probably that's true too!),

 Jacob





 James


 [1]
 http://www.codinghorror.com/blog/2006/08/computer-languages-arent-human-languages.html
 [2] http://daringfireball.net/2005/09/englishlikeness_monster




 --
 ***
 Jacob Pearson Keller
 Northwestern University
 Medical Scientist Training Program
 email: j-kell...@northwestern.edu
 ***



Re: [ccp4bb] Ligand geometry obs. vs. ideal

2012-09-13 Thread Anna Gardberg
I second Tim Gruene's suggestion of SHELXL; it's perfect for this.
However, there is a steep learning curve, so I strongly urge you to
pay close attention to the SHELXL (and SHELXPRO) manuals.

On Wed, Sep 12, 2012 at 11:44 AM, Yuri Pompeu yuri.pom...@ufl.edu wrote:
 Hi everyone,
 I am trying to show that a ligand underwent catalysis during a soaking 
 experiment.
 One of the things I would like to show is the geometry of the ligand, bond 
 angles/lengths, dihedrals, etc...
 One of my models has a hi-res of 1.18A and the ligand density is really clear 
 and complete.
 What is the best way to refine the ligand unrestrained and then generate 
 measurements?
 Also, the idea is to finally compare to ideal geometry. How should I generate 
 these values (any softwares in mind)?
 ANy idea is welcome.
 Thanks a lot


Re: [ccp4bb] Off-topic: Best Scripting Language

2012-09-13 Thread Eric Bennett
On Sep 12, 2012, at 2:28 PM, Ethan Merritt wrote:


 Why are you dis-ing python? Seems everybody loves it...
 
 I'm sure you can google for many reasons I hate Python lists.
 
 Mine would start
 1) sensitive to white space == fail
 2) dynamic typing makes it nearly impossible to verify program correctness,
   and very hard to debug problems that arise from unexpected input or
   a mismatch between caller and callee.   
 3) the language developers don't care about backward compatibility;
   it seems version 2.n+1 always breaks code written for version 2.n, 
   and let's not even talk about version 3
 4) slw unless you use it simply as a wrapper for C++,
   in which case why not just use C++ or C to begin with?
 5) not thread-safe
 
you did ask...
   
   Ethan
 


While I agree generally with your points and try to avoid python if at all 
possible, I'm not sure about what you mean with point 5, since it's certainly 
possible to write threaded python scripts.

Another point that is purely personal taste is the language philosophy that 
there is one official way to do something in Python, as contrasted with Perl 
(which is my choice) where the language philosophy is that there are many ways 
of doing any given task and the language is not designed to force you into a 
particular way of doing it.




Ed adds:

 While indeed 1/3=0 (but so it will be in C), I think it's a bit of an 
 overstatement that python code execution is nearly impossible to verify.
 Another goal of python is to accelerate implementation, and dynamic/duck 
 typing supposedly helps that.  The argument is simply that weak typing 
 favours strong testing, which should be a good thing.


Actually it's a bit of a hindrance.  In Perl I can call the int function on 
anything and get a sensible answer.  In python if you call int on a string that 
contains a floating point number the default behavior is that it will crash:


[woz:~] bennette% cat pytest.py
example_string = 10.3
number = int(example_string)

[woz:~] bennette% /Library/Frameworks/Python.framework/Versions/2.6/bin/python 
pytest.py
Traceback (most recent call last):
  File pytest.py, line 2, in module
number = int(example_string)
ValueError: invalid literal for int() with base 10: '10.3'





That's brain dead.  IMHO of course.

Cheers,
Eric