Print

Print


Thanks.

Reza Khayat, PhD
Assistant Professor
City College of New York
Department of Chemistry
New York, NY 10031

________________________________________
From: CCP4 bulletin board <[log in to unmask]> on behalf of Michal Jamroz <[log in to unmask]>
Sent: Thursday, July 7, 2016 2:24 PM
To: [log in to unmask]
Subject: Re: [ccp4bb] Random selection of atoms in PDB

just read you want to replace occ/bfactor, so add one pipe more:

grep '^ATOM' $pdb | shuf |tail -n`echo "($percent * $N)/1"|bc` |awk '{val=substr($0,57,10);gsub(val,"0.00  0.00",$0)}1'

Dnia 2016-07-07, o godz. 20:06:54
Michal Jamroz <[log in to unmask]> napisał(a):

> the same with bash oneliner:
>
> pdb='2pcy.pdb; percent=0.1; N=`grep -c '^ATOM' $pdb`; grep '^ATOM'
> $pdb| shuf |tail -n`echo "($percent * $N)/1"|bc`