[phenixbb] Number of atoms and average b-factors for specific chain IDs (with the option of specifying multiple chain IDs).

Pavel Afonine PAfonine at lbl.gov
Sat Mar 13 13:11:32 PST 2010


Hi,

I will add it to phenix.model_vs_data tool once I get a chance sometime next week.

Pavel.

----- Original Message -----
From: "Ralf W. Grosse-Kunstleve" <rwgk at cci.lbl.gov>
Date: Saturday, March 13, 2010 11:38 am
Subject: Re: [phenixbb] Number of atoms and average b-factors for specific chain IDs (with the option of specifying multiple chain IDs).
To: phenixbb at phenix-online.org

> > Is there anyway to get this quickly? Either by phenix util, web 
> util,  
> > or whatever?
> 
> Number of atoms is easy:
> 
>  phenix.pdb_atom_selection your.pdb 'chain A or chain B'
> 
> For the average B-factor you'll have to go to Python:
> 
> import iotbx.pdb
> from cctbx.array_family import flex
> import sys
> pdb_inp = iotbx.pdb.input(file_name=sys.argv[1])
> hierarchy = pdb_inp.construct_hierarchy()
> sel = hierarchy.atom_selection_cache().selection("chain A or chain B")
> print "number of atoms:", sel.count(True)
> print "mean b:", flex.mean(hierarchy.select(sel).atoms().extract_b())
> 
> Save to a file and run with "phenix.python".
> 
> Ralf
> _______________________________________________
> phenixbb mailing list
> phenixbb at phenix-online.org
> http://phenix-online.org/mailman/listinfo/phenixbb
> 



More information about the phenixbb mailing list