[gmx-users] Removal of Waters in Hydrophobic Core

Christopher Neale chris.neale at alum.utoronto.ca
Fri Nov 25 21:48:43 CET 2016


not sure if it is a typo or perhaps a command structure I am unfamiliar with, but I don't understand your command.

Try this:

chmod +x keepbyz.pl
./keepbyz.pl new_waters.gro > keep_these_waters.gro

see here: http://www.gromacs.org/Documentation/How-tos/Membrane_Simulations?highlight=generates
________________________________________
From: gromacs.org_gmx-users-bounces at maillist.sys.kth.se <gromacs.org_gmx-users-bounces at maillist.sys.kth.se> on behalf of Sanim Rahman <sanimr at mail.usf.edu>
Sent: 24 November 2016 16:12:11
To: gromacs.org_gmx-users at maillist.sys.kth.se
Subject: [gmx-users] Removal of Waters in Hydrophobic Core

Hello,

I am currently working through the second tutorial of the Bevan Labs KALP15
simulation. I am attempting to use the keepbyz.pl script to remove the
waters in the hydrophobic core. I have designated a upperz and
lowerz coordinated and followed the entire section highlighted in the
instructions, however, my output (new_system_sequential_numbers.gro) has no
deleted water molecules. It is the same system as  solvated.gro.

I believe my error is within the keepbyz.pl file, because when I input the
command:

chmod +x keepbyz.pl new_waters.gro > keep_these_waters.gro

the file "keep_these_waters.gro" is an empty file.

Here is my script for keepbyz.pl:

#!/bin/bash
# give new_waters.gro as first command line arguement
upperz=5.821
lowerz=0.574
sol=SOL
count=0
cat $1 | grep "$sol" | while read line; do
  for first in $line; do
    break
  done
  if [ "$count" = 3 ]; then
    count=0
  fi
  count=$(expr $count + 1)
  if [ "$count" != 1 ]; then
    continue
  fi
  l=${#line}
  m=$(expr $l - 24)  // would use -48 if velocities are also in .gro and
-24 otherwise
  i=1
  for word in ${line:$m}; do
    if [ "$i" = 1 ]; then
      popex=$word
    else
      if [ "$i" = 2 ]; then
        popey=$word
      else
        if [ "$i" = 3 ]; then
          popez=$word
          break
        fi
      fi
    fi
    i=$(expr $i + 1)
  done
  nolx=`echo "$popez > $upperz" | bc`
  nohx=`echo "$popez < $lowerz" | bc`
  myno=$(expr $nolx + $nohx)
  if [ "$myno" != 0 ]; then
    z=${#first}
    if [ "$z" != 8 ]; then
      sfirst="[[:space:]]$first"
    else
      sfirst=$first
    fi
    `echo grep $sfirst $1`
  fi
done

I will appreciate the help!

Regards,

*Sanim Rahman*
B.S. Chemical Engineering, 2019
Resident Assistant, Castor Hall Engineering Living Learning Community
2016-2017
Undergraduate Researcher, Global Center for Hearing and Speech Research
Honors College Engineering Peer Advisor
<https://www.linkedin.com/pub/sanim-rahman/108/a64/986>
--
Gromacs Users mailing list

* Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-request at gromacs.org.


More information about the gromacs.org_gmx-users mailing list