[gmx-users] File editing - only one layer of water around a molecule

Justin A. Lemkul jalemkul at vt.edu
Mon Apr 30 18:35:52 CEST 2012



On 4/30/12 12:29 PM, Lara Bunte wrote:
> Hi Justin
>
> I got the error
>
>
> Can not open file:
> topol.tpr
>
>
> if I type trjconv -n index.ndx -f molecule.pdb -o output.pdb -s
>
>
> and I got the error
>
> Can not open file:
> traj.xtc
>
> if I type trjconv -n index.ndx -f -s molecule.pdb -o output.pdb
>
>
> What is the problem?
>

Again, as has been stated several times, giving any Gromacs program a command 
line option (like -s or -f) in the absence of an explicit file name, will cause 
the program to look for a default file name (which are listed in the manual or 
with -h).  In the first case, with no file name given to -s, trjconv looks for 
topol.tpr and fails.  In the second case, -f is looking for traj.xtc and fails. 
  Provide explicit file names for all options, unless you actually have used the 
default names (which in your case, you haven't).

Please go back to my previous advice: "Supply your .pdb file to the -s flag." 
That doesn't mean add -s to the command line and expect magic to happen ;)  It 
means you need to invoke the -s flag to signal that you are providing a file 
there, and then name that file.  For pedantic purposes:

trjconv -n index.ndx -f molecule.pdb -s molecule.pdb -o output.pdb

The -f flag specifies the file that is being operated on.
The -s flag specifies a file from which (in this case) atom and residue names 
are being read.  It is necessary because your output format (.pdb) requires this 
information.

-Justin

-- 
========================================

Justin A. Lemkul
Ph.D. Candidate
ICTAS Doctoral Scholar
MILES-IGERT Trainee
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080
http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin

========================================



More information about the gromacs.org_gmx-users mailing list