Sponsored Content
Top Forums Shell Programming and Scripting [awk] line by line processing the same file Post 302708771 by origamisven on Tuesday 2nd of October 2012 08:03:43 AM
Old 10-02-2012
You guys are awesome, thanks all around... Double entries were not desired, I just left the issue out because I didn't want to cause confusion.

DISTCUT=3.5 by the way, a geometric hydrogen bonding criterion in angstrom...

This forum is so good Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

processing line in file

Hi I amtrying to read the lines from a file, these lines are absolute paths in the system. I want to check if these paths exists, if they doesn't I want to create that path and put a file in that location/path. I had no trouble filtering these paths out using awk, grep, uniq etc but when it... (8 Replies)
Discussion started by: fablef00
8 Replies

2. Shell Programming and Scripting

AWK Multi-Line Records Processing

I am an Awk newbie and cannot wrap my brain around my problem: Given multi-line records of varying lengths separated by a blank line I need to skip the first two lines of every record and extract every-other line in each record unless the first line of the record has the word "(CONT)" in the... (10 Replies)
Discussion started by: RacerX
10 Replies

3. Shell Programming and Scripting

File processing line by line

Hi, I am doing file processing line by line. while reading each line at a specified location I am searching for a particular character and then write that line to another file. Problem is while writing to another file it was supressing the spaces, which I don't want to do. Any help is... (1 Reply)
Discussion started by: suma
1 Replies

4. Shell Programming and Scripting

Reading a file line by line and processing for each line

Hi, I am a beginner in shell scripting. I have written the following script, which is supposed to process the while loop for each line in the sid_home.txt file. But I'm getting the 'end of file' unexpected for the last line. The file sid_home.txt gets generated as expected, but the script... (6 Replies)
Discussion started by: sagarparadkar
6 Replies

5. Shell Programming and Scripting

awk, perl Script for processing a single line text file

I need a script to process a huge single line text file: The sample of the text is: "forward_inline_item": "Inline", "options_region_Australia": "Australia", "server_event_err_msg": "There was an error attempting to save", "Token": "Yes", "family": "Family","pwd_login_tab": "Enter Your... (1 Reply)
Discussion started by: hmsadiq
1 Replies

6. Shell Programming and Scripting

Awk not working due to missing new line character at last line of file

Hi, My awk program is failing. I figured out using command od -c filename that the last line of the file doesnt end with a new line character. Mine is an automated process because of this data is missing. How do i handle this? I want to append new line character at the end of last... (2 Replies)
Discussion started by: pinnacle
2 Replies

7. Shell Programming and Scripting

reading a file inside awk and processing line by line

Hi Sorry to multipost. I am opening the new thread because the earlier threads head was misleading to my current doubt. and i am stuck. list=`cat /u/Test/programs`; psg "ServTest" | awk -v listawk=$list '{ cmd_name=($5 ~ /^/)? $9:$8 for(pgmname in listawk) ... (6 Replies)
Discussion started by: Anteus
6 Replies

8. Shell Programming and Scripting

AWK: Remove spaces before processing each line?

Hi, all I have a file containing the following data: name: PRODUCT_1 date: 2010-01-07 really_long_name: PRODUCT_ABCDEFG I want to get the date (it is "2010-01-07" here), I could use the following code to do that: awk... (6 Replies)
Discussion started by: kevintse
6 Replies

9. Shell Programming and Scripting

Individual Line processing in awk

Hi , I have a file like Activate your Membership now! Dear Cyrus Every relationship needs nurturing. Including ours. 2011-08-09T10:18:14Z 2011-08-09T10:18:14Z tag:gmail.google.com,2004:1376659800396305843 T League email@email.tleague.com How to refresh a graphical display through... (3 Replies)
Discussion started by: ddspark
3 Replies

10. Shell Programming and Scripting

Printing string from last field of the nth line of file to start (or end) of each line (awk I think)

My file (the output of an experiment) starts off looking like this, _____________________________________________________________ Subjects incorporated to date: 001 Data file started on machine PKSHS260-05CP ********************************************************************** Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
pdb2gmx(1)					 GROMACS suite, VERSION 4.5.4-dev-20110404-bc5695c					pdb2gmx(1)

NAME
pdb2gmx - converts pdb files to topology and coordinate files VERSION 4.5.4-dev-20110404-bc5695c SYNOPSIS
pdb2gmx -f eiwit.pdb -o conf.gro -p topol.top -i posre.itp -n clean.ndx -q clean.pdb -[no]h -[no]version -nice int -chainsep enum -ff string -water enum -[no]inter -[no]ss -[no]ter -[no]lys -[no]arg -[no]asp -[no]glu -[no]gln -[no]his -angle real -dist real -[no]una -[no]ignh -[no]missing -[no]v -posrefc real -vsite enum -[no]heavyh -[no]deuterate -[no]chargegrp -[no]cmap -[no]renum -[no]rtpres DESCRIPTION
This program reads a .pdb (or .gro) file, reads some database files, adds hydrogens to the molecules and generates coordinates in GROMACS (GROMOS), or optionally .pdb, format and a topology in GROMACS format. These files can subsequently be processed to generate a run input file. pdb2gmx will search for force fields by looking for a forcefield.itp file in subdirectories forcefield.ff of the current working direc- tory and of the Gromacs library directory as inferred from the path of the binary or the GMXLIB environment variable. By default the forcefield selection is interactive, but you can use the -ff option to specify one of the short names in the list on the command line instead. In that case pdb2gmx just looks for the corresponding forcefield.ff directory. After choosing a force field, all files will be read only from the corresponding force field directory. If you want to modify or add a residue types, you can copy the force field directory from the Gromacs library directory to your current working directory. If you want to add new protein residue types, you will need to modify residuetypes.dat in the library directory or copy the whole library directory to a local directory and set the environment variable GMXLIB to the name of that directory. Check Chapter 5 of the manual for more information about file formats. Note that a .pdb file is nothing more than a file format, and it need not necessarily contain a protein structure. Every kind of molecule for which there is support in the database can be converted. If there is no support in the database, you can add it yourself. The program has limited intelligence, it reads a number of database files, that allow it to make special bonds (Cys-Cys, Heme-His, etc.), if necessary this can be done manually. The program can prompt the user to select which kind of LYS, ASP, GLU, CYS or HIS residue she wants. For LYS the choice is between neutral (two protons on NZ) or protonated (three protons, default), for ASP and GLU unprotonated (default) or protonated, for HIS the proton can be either on ND1, on NE2 or on both. By default these selections are done automatically. For His, this is based on an optimal hydrogen bonding conformation. Hydrogen bonds are defined based on a simple geometric criterion, spec- ified by the maximum hydrogen-donor-acceptor angle and donor-acceptor distance, which are set by -angle and -dist respectively. The separation of chains is not entirely trivial since the markup in user-generated PDB files frequently varies and sometimes it is desir- able to merge entries across a TER record, for instance if you want a disulfide bridge or distance restraints between two protein chains or if you have a HEME group bound to a protein. In such cases multiple chains should be contained in a single moleculetype definition. To handle this, pdb2gmx has an option -chainsep so you can choose whether a new chain should start when we find a TER record, when the chain id changes, combinations of either or both of these or fully interactively. pdb2gmx will also check the occupancy field of the .pdb file. If any of the occupancies are not one, indicating that the atom is not resolved well in the structure, a warning message is issued. When a .pdb file does not originate from an X-ray structure determination all occupancy fields may be zero. Either way, it is up to the user to verify the correctness of the input data (read the article!). During processing the atoms will be reordered according to GROMACS conventions. With -n an index file can be generated that contains one group reordered in the same way. This allows you to convert a GROMOS trajectory and coordinate file to GROMOS. There is one limitation: reordering is done after the hydrogens are stripped from the input and before new hydrogens are added. This means that you should not use -ignh. The .gro and .g96 file formats do not support chain identifiers. Therefore it is useful to enter a .pdb file name at the -o option when you want to convert a multi-chain .pdb file. The option -vsite removes hydrogen and fast improper dihedral motions. Angular and out-of-plane motions can be removed by changing hydro- gens into virtual sites and fixing angles, which fixes their position relative to neighboring atoms. Additionally, all atoms in the aro- matic rings of the standard amino acids (i.e. PHE, TRP, TYR and HIS) can be converted into virtual sites, eliminating the fast improper dihedral fluctuations in these rings. Note that in this case all other hydrogen atoms are also converted to virtual sites. The mass of all atoms that are converted into virtual sites, is added to the heavy atoms. Also slowing down of dihedral motion can be done with -heavyh done by increasing the hydrogen-mass by a factor of 4. This is also done for water hydrogens to slow down the rotational motion of water. The increase in mass of the hydrogens is subtracted from the bonded (heavy) atom so that the total mass of the system remains the same. FILES
-f eiwit.pdb Input Structure file: gro g96 pdb tpr etc. -o conf.gro Output Structure file: gro g96 pdb etc. -p topol.top Output Topology file -i posre.itp Output Include file for topology -n clean.ndx Output, Opt. Index file -q clean.pdb Output, Opt. Structure file: gro g96 pdb etc. OTHER OPTIONS
-[no]hno Print help info and quit -[no]versionno Print version info and quit -nice int 0 Set the nicelevel -chainsep enum id_or_ter Condition in PDB files when a new chain and molecule_type should be started: id_or_ter, id_and_ter, ter, id or interactive -ff string select Force field, interactive by default. Use -h for information. -water enum select Water model to use: select, none, spc, spce, tip3p, tip4p or tip5p -[no]interno Set the next 8 options to interactive -[no]ssno Interactive SS bridge selection -[no]terno Interactive termini selection, iso charged -[no]lysno Interactive lysine selection, iso charged -[no]argno Interactive arginine selection, iso charged -[no]aspno Interactive aspartic Acid selection, iso charged -[no]gluno Interactive glutamic Acid selection, iso charged -[no]glnno Interactive glutamine selection, iso neutral -[no]hisno Interactive histidine selection, iso checking H-bonds -angle real 135 Minimum hydrogen-donor-acceptor angle for a H-bond (degrees) -dist real 0.3 Maximum donor-acceptor distance for a H-bond (nm) -[no]unano Select aromatic rings with united CH atoms on phenylalanine, tryptophane and tyrosine -[no]ignhno Ignore hydrogen atoms that are in the coordinate file -[no]missingno Continue when atoms are missing, dangerous -[no]vno Be slightly more verbose in messages -posrefc real 1000 Force constant for position restraints -vsite enum none Convert atoms to virtual sites: none, hydrogens or aromatics -[no]heavyhno Make hydrogen atoms heavy -[no]deuterateno Change the mass of hydrogens to 2 amu -[no]chargegrpyes Use charge groups in the .rtp file -[no]cmapyes Use cmap torsions (if enabled in the .rtp file) -[no]renumno Renumber the residues consecutively in the output -[no]rtpresno Use .rtp entry names as residue names SEE ALSO
gromacs(7) More information about GROMACS is available at <http://www.gromacs.org/>. Mon 4 Apr 2011 pdb2gmx(1)
All times are GMT -4. The time now is 04:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy