CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
merge 3 files

 



iain
Novice

Feb 16, 2010, 4:29 AM

Post #1 of 1 (1618 views)
merge 3 files Can't Post

Hello,

I have 2 files containing numbers in columns which i want to add to another file, replacing 2 of the columns in it.

My files containing the numbers look like this:

3.09779100E-02
4.35695193E+00
4.35695193E+00
4.35695193E+00
1.07147124E+00
2.19032046E+00
1.65640707E+00
-4.22757360E-01
-4.22757360E-01
-4.30046280E-01


and

1.55000000E+00
1.30000000E+00
1.30000000E+00
1.30000000E+00
1.70000000E+00
1.30000000E+00
1.70000000E+00
1.30000000E+00
1.30000000E+00
1.70000000E+00
1.30000000E+00
1.30000000E+00


The file i am trying to insert them into looks like this:

CRYST1 99.361 99.361 99.361 109.47 109.47 109.47 P 1
ATOM 1 N GLU 1 -6.790 39.596 -16.369 0.00 0.00
ATOM 2 H1 GLU 1 -6.271 38.908 -16.896 0.00 0.00
ATOM 3 H2 GLU 1 -6.420 40.515 -16.563 0.00 0.00
ATOM 4 H3 GLU 1 -7.714 39.580 -16.775 0.00 0.00
ATOM 5 CA GLU 1 -6.822 39.411 -14.900 0.00 0.00
ATOM 6 HA GLU 1 -5.799 39.305 -14.539 0.00 0.00
ATOM 7 CB GLU 1 -7.580 40.542 -14.136 0.00 0.00
ATOM 8 2HB GLU 1 -7.127 41.527 -14.248 0.00 0.00

I am trying to insert the 2 columns of numbers so as to replace the 2 columns of zeros shown above (ie replace starting from line 2)

can anyone help with this, it'd be much appreciated!

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives