Re: [AMBER] Switching-off the partial charges

From: Daniel Sindhikara <sindhikara.gmail.com>
Date: Wed, 20 Jun 2012 15:17:30 +0900

I just had this problem, I wrote a quick bash script. Make sure to check
your new prmtop afterwards to make sure it looks correct.
For my prmtop the next flag after CHARGE was ATOMIC_NUMBER. Not sure if
this is always the case. I'm sure someone else
has a more elegant way to do it.


chargeline=`grep -n CHARGE my.prmtop | cut -f1 -d ":"`
headendline=`expr $chargeline + 1`
atomicnumberline=`grep -n ATOMIC_NUMBER my.prmtop | cut -f1 -d ":"`
tailstartline=`expr $atomicnumberline - 1`
head -n $headendline my.prmtop > prmhead
sed -e "1,$tailstartline d" my.prmtop > prmtail
echo $atomicnumberline
numchargelines=`expr $atomicnumberline - $chargeline - 2`
head -n $tailstartline my.prmtop | tail -n $numchargelines > charges
for digit in 1 2 3 4 5 6 7 8 9
        do
        perl -pi.bak -e "s.$digit.0.g" charges
        done
cat prmhead > my.prmtop
cat charges >> my.prmtop
cat prmtail >> my.prmtop

-Dan


On Wed, Jun 20, 2012 at 2:56 PM, Adam Jion <adamjion.yahoo.com> wrote:

> Hi,
>
> Is there an easy way to temporarily switch-off the partial charges of my
> molecules?
> The very hard way (and only way?) is to modify the .prmtop file by hand.
>
> Regards,
> Adam
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>



-- 
Dr. Daniel J. Sindhikara <http://goo.gl/fLAqx>
Ritsumeikan University <http://www.ritsumei.ac.jp/eng/> - Biwako Kusatsu
Campus <http://www.ritsumei.ac.jp/eng/html/about/abo_08.html/#kusatsu>
sindhikara.gmail.com
$B%7%s%G%#%+%i(B $B%.%K%(%k(B <http://goo.gl/fLAqx>
$BN)L?4[Bg3X(B <http://www.ritsumei.jp/index_j.html>
$B$S$o$3!&$/$5$D%-%c%s%Q%9(B<http://www.ritsumei.jp/accessmap/accessmap_bkc_j.html>
$B%/%j%(!<%7%g%s(B $B%3%"!&#2(BF$B!&7W;;.8L?2=3X8&5f<<!J5FCS8&5f<<!K(B
$BEEOCHV9f!'(B077-561-2617 $BFb.~(B: 6841
--
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Jun 19 2012 - 23:30:02 PDT
Custom Search