[gmx-users] removing number of sol

gromacs query gromacsquery at gmail.com
Fri Mar 1 14:45:10 CET 2013


Aha! thanks Erik (and Justin),

I really feel sorry 35 and 135 will be removed by sed. I must have given a
thought about that. So this was reason sed was over doing the things. Also
as you asked: They are random residue number water molecules so
not continuous and they were selected on the criteria based on X Y Z
coordinates (some space fixed and outlier waters are to be removed)

regards,


On Fri, Mar 1, 2013 at 3:09 PM, Erik Marklund <erikm at xray.bmc.uu.se> wrote:

>
> On Mar 1, 2013, at 2:08 PM, Erik Marklund wrote:
>
>
>> On Mar 1, 2013, at 1:58 PM, gromacs query wrote:
>>
>>  Dear Erik,
>>>
>>>  so you can filter out the unwanted residues there instead of using an
>>>>>
>>>> index file.
>>>
>>> There are thousands of water to be removed so simple commands like sed
>>> exhausts when I run it in loops. e.g. Just to say :
>>>
>>> sed -e '/35SOL/d' -e '/36SOL/d' -e '/38SOL/d' -e '/39SOL/d' -e '/40SOL/d'
>>> -e '/41SOL/d' -e '/42SOL/d' -e '/43SOL/d' -e '/44SOL/d' -e '/45SOL/d'
>>> old.gro > new2.gro
>>>
>>> this will remove such 10 residues but if you run this again and again (in
>>> text exe format) say 1000 times it exhausts some how and remove waters
>>> which are not even mentioned in sed command! I have checked it many
>>> times.
>>> So I thought if index file could help me. But please reply for point 3:
>>>
>>
>> First of all, that's not a safe way of removing waters. Note that both
>> SOL 35, SOL 135, ... will be removed by that command. Secondly, I'm sure
>> you can think of a better way of scripting it, using e.g. sed or awk. By
>> which criteria do you select the waters to be removed?
>>
>
> If its a contiguous chunk then it's dead simple.
>
>
>
>>
>>>  3) Also once I get index file can editconf help to write a new gro
>>>>>>
>>>>> without the residues mentioned in index file?. I used this editconf -f
>>> my.gro -n index.ndx -o del.gro .
>>>
>>>
>>> thanks,
>>>
>>> This gave me del.gro having residues mentioned in index file. But I want
>>> del.gro file without the residues mentioned in index file.
>>>
>>> On Fri, Mar 1, 2013 at 2:48 PM, Erik Marklund <erikm at xray.bmc.uu.se>
>>> wrote:
>>>
>>>  The ndx format is really simple. You can easily script your way to a new
>>>> index group as long as the selection of atoms can be automated.
>>>> Furthermore, the gro format is also simple, so you can filter out the
>>>> unwanted residues there instead of using an index file.
>>>>
>>>> Erik
>>>>
>>>>
>>>> On Mar 1, 2013, at 1:42 PM, gromacs query wrote:
>>>>
>>>> Dear All,
>>>>
>>>>>
>>>>> I know the residue numbers of SOL molecules (which are more than
>>>>> thousands)
>>>>> which I want to remove them from a gro file. I searched that make_ndx
>>>>> can
>>>>> be used make a index file to define residues. But It is a prompt based
>>>>> tool
>>>>> and its difficult to type manually thousands of residue numbers.
>>>>>
>>>>> 1) Is there some way to feed the residue numbers to make_ndx? Or I
>>>>> need to
>>>>> make index file format my self by some scritpting Or is there is rather
>>>>> easier way of doing in gromacs.
>>>>>
>>>>> 2) Also is there any direct command which helps to remove a residue
>>>>> number
>>>>> directly from a gro file without using index file input; means residue
>>>>> defined in command itself?
>>>>>
>>>>> 3) Also once I get index file can editconf help to write a new gro
>>>>> without
>>>>> the residues mentioned in index file?. I used this editconf -f my.gro
>>>>> -n
>>>>> index.ndx -o del.gro .
>>>>>
>>>>> This gave me del.gro having residues mentioned in index file. But I
>>>>> want
>>>>> del.gro file without the residues mentioned in index file.
>>>>>
>>>>>
>>>>> regards,
>>>>> --
>>>>> gmx-users mailing list    gmx-users at gromacs.org
>>>>> http://lists.gromacs.org/****mailman/listinfo/gmx-users<http://lists.gromacs.org/**mailman/listinfo/gmx-users>
>>>>> <htt**p://lists.gromacs.org/mailman/**listinfo/gmx-users<http://lists.gromacs.org/mailman/listinfo/gmx-users>
>>>>> >
>>>>> * Please search the archive at http://www.gromacs.org/**
>>>>> Support/Mailing_Lists/Search<h**ttp://www.gromacs.org/Support/**
>>>>> Mailing_Lists/Search<http://www.gromacs.org/Support/Mailing_Lists/Search>>before
>>>>> posting!
>>>>> * Please don't post (un)subscribe requests to the list. Use the
>>>>> www interface or send it to gmx-users-request at gromacs.org.
>>>>> * Can't post? Read http://www.gromacs.org/****Support/Mailing_Lists<http://www.gromacs.org/**Support/Mailing_Lists>
>>>>> <http://**www.gromacs.org/Support/**Mailing_Lists<http://www.gromacs.org/Support/Mailing_Lists>
>>>>> >
>>>>>
>>>>>
>>>> --
>>>> gmx-users mailing list    gmx-users at gromacs.org
>>>> http://lists.gromacs.org/****mailman/listinfo/gmx-users<http://lists.gromacs.org/**mailman/listinfo/gmx-users>
>>>> <htt**p://lists.gromacs.org/mailman/**listinfo/gmx-users<http://lists.gromacs.org/mailman/listinfo/gmx-users>
>>>> >
>>>> * Please search the archive at http://www.gromacs.org/**
>>>> Support/Mailing_Lists/Search<h**ttp://www.gromacs.org/Support/**
>>>> Mailing_Lists/Search<http://www.gromacs.org/Support/Mailing_Lists/Search>>before
>>>> posting!
>>>> * Please don't post (un)subscribe requests to the list. Use thewww
>>>> interface or send it to gmx-users-request at gromacs.org.
>>>> * Can't post? Read http://www.gromacs.org/****Support/Mailing_Lists<http://www.gromacs.org/**Support/Mailing_Lists>
>>>> <http://**www.gromacs.org/Support/**Mailing_Lists<http://www.gromacs.org/Support/Mailing_Lists>
>>>> >
>>>>
>>>>  --
>>> gmx-users mailing list    gmx-users at gromacs.org
>>> http://lists.gromacs.org/**mailman/listinfo/gmx-users<http://lists.gromacs.org/mailman/listinfo/gmx-users>
>>> * Please search the archive at http://www.gromacs.org/**
>>> Support/Mailing_Lists/Search<http://www.gromacs.org/Support/Mailing_Lists/Search>before posting!
>>> * Please don't post (un)subscribe requests to the list. Use the
>>> www interface or send it to gmx-users-request at gromacs.org.
>>> * Can't post? Read http://www.gromacs.org/**Support/Mailing_Lists<http://www.gromacs.org/Support/Mailing_Lists>
>>>
>>
>> --
>> gmx-users mailing list    gmx-users at gromacs.org
>> http://lists.gromacs.org/**mailman/listinfo/gmx-users<http://lists.gromacs.org/mailman/listinfo/gmx-users>
>> * Please search the archive at http://www.gromacs.org/**
>> Support/Mailing_Lists/Search<http://www.gromacs.org/Support/Mailing_Lists/Search>before posting!
>> * Please don't post (un)subscribe requests to the list. Use thewww
>> interface or send it to gmx-users-request at gromacs.org.
>> * Can't post? Read http://www.gromacs.org/**Support/Mailing_Lists<http://www.gromacs.org/Support/Mailing_Lists>
>>
>
> --
> gmx-users mailing list    gmx-users at gromacs.org
> http://lists.gromacs.org/**mailman/listinfo/gmx-users<http://lists.gromacs.org/mailman/listinfo/gmx-users>
> * Please search the archive at http://www.gromacs.org/**
> Support/Mailing_Lists/Search<http://www.gromacs.org/Support/Mailing_Lists/Search>before posting!
> * Please don't post (un)subscribe requests to the list. Use thewww
> interface or send it to gmx-users-request at gromacs.org.
> * Can't post? Read http://www.gromacs.org/**Support/Mailing_Lists<http://www.gromacs.org/Support/Mailing_Lists>
>



More information about the gromacs.org_gmx-users mailing list