From owner-chemistry: at :ccl.net Fri Aug 12 16:21:00 2011 From: "Shobana Sundaram/FS/VCU ssundaram*o*vcu.edu" To: CCL Subject: CCL: Fortran question Message-Id: <-45248-110812160356-29850-jbt6CYuR7Vgm6wLysX0uOw.&$at$&.server.ccl.net> X-Original-From: Shobana Sundaram/FS/VCU Content-Type: multipart/alternative; boundary="=_alternative 006E2FBF852578EA_=" Date: Fri, 12 Aug 2011 16:03:46 -0400 MIME-Version: 1.0 Sent to CCL by: Shobana Sundaram/FS/VCU [ssundaram()vcu.edu] This is a multipart message in MIME format. --=_alternative 006E2FBF852578EA_= Content-Type: text/plain; charset="US-ASCII" Hi, It would be nice to see your code as well. Nevertheless, you may not have assigned the second variable that reads 'benzene' as character. Most Fortran codes would terminate writing at that point. Also most Fortran compilers by default ignore anything past the 80th column position in a line. However, this can be over-ridden by compiler options Good Luck! -shobana --------------- Shobana Sundaram, Ph.D., Instructor, VCU-SOM, Richmond, VA > From: "Richard Leo Wood rwoodphd||msn.com" To: "Sundaram, Shobana " Date: 08/12/2011 03:06 PM Subject: CCL: Fortran question Sent by: owner-chemistry+ssundaram==vcu.edu:+:ccl.net Sent to CCL by: "Richard Leo Wood" [rwoodphd(_)msn.com] Hi all, I have a real simple Fortran question-however, I cna't seem to find the answer anywhere and I've looked everywhere. I'm trying to write a Fortran program that will read in an external molecule file in dat format, manipulate it and then write the output to a new dat file. I'm at the point where I am reading in the file and trying to write it out. Here's my file: 00012 benzene 002 00002 2 00006 1 00007 1 00000 0 00000 0 00000 0 -000.696800 -001.210000 -000.001000 0 10 000.00000000.00000 002 00001 2 00003 1 00008 1 00000 0 00000 0 00000 0 0000.699600 -001.208900 0000.000000 0 10 000.00000000.00000 002 00002 1 00004 2 00009 1 00000 0 00000 0 00000 0 0001.396500 0000.001200 0000.001000 0 10 000.00000000.00000 002 00003 2 00005 1 00010 1 00000 0 00000 0 00000 0 0000.697000 0001.209900 0000.001000 0 10 000.00000000.00000 002 00004 1 00006 2 00011 1 00000 0 00000 0 00000 0 -000.699400 0001.208600 0000.000000 0 10 000.00000000.00000 002 00001 1 00005 2 00012 1 00000 0 00000 0 00000 0 -001.396500 -000.001400 -000.001000 0 10 000.00000000.00000 041 00001 1 00000 0 00000 0 00000 0 00000 0 00000 0 -001.247600 -002.165800 -000.001800 0 21 000.00000000.00000 041 00002 1 00000 0 00000 0 00000 0 00000 0 00000 0 0001.252000 -002.163700 0000.000000 0 21 000.00000000.00000 041 00003 1 00000 0 00000 0 00000 0 00000 0 00000 0 0002.499600 0000.002400 0000.001800 0 21 000.00000000.00000 041 00004 1 00000 0 00000 0 00000 0 00000 0 00000 0 0001.247700 0002.165800 0000.001800 0 21 000.00000000.00000 041 00005 1 00000 0 00000 0 00000 0 00000 0 00000 0 -001.252000 0002.163400 0000.000000 0 21 000.00000000.00000 041 00006 1 00000 0 00000 0 00000 0 00000 0 00000 0 -002.499600 -000.002600 -000.001800 0 21 000.00000000.00000 I read it in, and when I write it out to a new file, all I get is the 00012. So, that's all it is reading in or all it is writing out. How can I get my code to read the whole molecule in and then write it all back out? TIA.http://www.ccl.net/cgi-bin/ccl/send_ccl_messagehttp://www.ccl.net/chemistry/sub_unsub.shtmlhttp://www.ccl.net/spammers.txt--=_alternative 006E2FBF852578EA_= Content-Type: text/html; charset="US-ASCII" Hi,

It would be nice to see your code as well. Nevertheless, you may not have assigned the second variable that reads 'benzene' as character.  Most Fortran codes would terminate writing at that point.  Also  most Fortran compilers by default ignore anything past the 80th column position in a line. However, this can be over-ridden by compiler options

Good Luck!

-shobana

---------------
Shobana Sundaram, Ph.D.,
Instructor,
VCU-SOM,
Richmond, VA



From:        "Richard Leo Wood rwoodphd||msn.com" <owner-chemistry:+:ccl.net>
To:        "Sundaram, Shobana " <ssundaram:+:vcu.edu>
Date:        08/12/2011 03:06 PM
Subject:        CCL: Fortran question
Sent by:        owner-chemistry+ssundaram==vcu.edu:+:ccl.net





Sent to CCL by: "Richard Leo Wood" [rwoodphd(_)msn.com]
Hi all,

I have a real simple Fortran question-however, I cna't seem to find the answer anywhere and I've looked everywhere.

I'm trying to write a Fortran program that will read in an external molecule file in dat format, manipulate it and then write the output to a new dat file.

I'm at the point where I am reading in the file and trying to write it out.

Here's my file:

00012  benzene
002 00002 2 00006 1 00007 1 00000 0 00000 0 00000 0 -000.696800 -001.210000 -000.001000 0  10      000.00000000.00000
002 00001 2 00003 1 00008 1 00000 0 00000 0 00000 0 0000.699600 -001.208900 0000.000000 0  10      000.00000000.00000
002 00002 1 00004 2 00009 1 00000 0 00000 0 00000 0 0001.396500 0000.001200 0000.001000 0  10      000.00000000.00000
002 00003 2 00005 1 00010 1 00000 0 00000 0 00000 0 0000.697000 0001.209900 0000.001000 0  10      000.00000000.00000
002 00004 1 00006 2 00011 1 00000 0 00000 0 00000 0 -000.699400 0001.208600 0000.000000 0  10      000.00000000.00000
002 00001 1 00005 2 00012 1 00000 0 00000 0 00000 0 -001.396500 -000.001400 -000.001000 0  10      000.00000000.00000
041 00001 1 00000 0 00000 0 00000 0 00000 0 00000 0 -001.247600 -002.165800 -000.001800 0  21      000.00000000.00000
041 00002 1 00000 0 00000 0 00000 0 00000 0 00000 0 0001.252000 -002.163700 0000.000000 0 21       000.00000000.00000
041 00003 1 00000 0 00000 0 00000 0 00000 0 00000 0 0002.499600 0000.002400 0000.001800 0 21       000.00000000.00000
041 00004 1 00000 0 00000 0 00000 0 00000 0 00000 0 0001.247700 0002.165800 0000.001800 0 21       000.00000000.00000
041 00005 1 00000 0 00000 0 00000 0 00000 0 00000 0 -001.252000 0002.163400 0000.000000 0 21       000.00000000.00000
041 00006 1 00000 0 00000 0 00000 0 00000 0 00000 0 -002.499600 -000.002600 -000.001800 0 21       000.00000000.00000

I read it in, and when I write it out to a new file, all I get is the 00012.

So, that's all it is reading in or all it is writing out.  How can I get my code to read the whole molecule in and then write it all back out?

TIA.


     
http://www.ccl.net/cgi-bin/ccl/send_ccl_message
     
http://www.ccl.net/cgi-bin/ccl/send_ccl_message
     
http://www.ccl.net/chemistry/sub_unsub.shtml

Before posting, check wait time at:
http://www.ccl.net

Job:
http://www.ccl.net/jobs
Conferences:
http://server.ccl.net/chemistry/announcements/conferences/

Search Messages:
http://www.ccl.net/chemistry/searchccl/index.shtml
     
http://www.ccl.net/spammers.txt

RTFI:
http://www.ccl.net/chemistry/aboutccl/instructions/



--=_alternative 006E2FBF852578EA_=--