CCL: Fortran question
- From: Shobana Sundaram/FS/VCU <ssundaram|vcu.edu>
- Subject: CCL: Fortran question
- Date: Fri, 12 Aug 2011 16:03:46 -0400
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_messagehttp-:-//www.ccl.net/chemistry/sub_unsub.shtmlhttp-:-//www.ccl.net/spammers.txt--=_alternative
006E2FBF852578EA_=
Content-Type: text/html; charset="US-ASCII"
<font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">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 </font><font
size=3>most Fortran
compilers by default ignore anything past the 80th column position in a
line. However, this can be over-ridden by compiler options</font>
<br>
<br><font size=3>Good Luck!</font>
<br>
<br><font size=3>-shobana</font>
<br>
<br><font size=3>---------------</font>
<br><font size=3>Shobana Sundaram, Ph.D.,</font>
<br><font size=3>Instructor, </font>
<br><font size=3>VCU-SOM,</font>
<br><font size=3>Richmond, VA</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1
face="sans-serif">"Richard Leo Wood
rwoodphd||msn.com"
<owner-chemistry:+:ccl.net></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1
face="sans-serif">"Sundaram, Shobana
" <ssundaram:+:vcu.edu></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">08/12/2011
03:06 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1
face="sans-serif">CCL: Fortran
question</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by:
</font><font size=1
face="sans-serif">owner-chemistry+ssundaram==vcu.edu:+:ccl.net</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2><br>
Sent to CCL by: "Richard Leo Wood"
[rwoodphd(_)msn.com]<br>
Hi all,<br>
<br>
I have a real simple Fortran question-however, I cna't seem to find the
answer anywhere and I've looked everywhere.<br>
<br>
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.<br>
<br>
I'm at the point where I am reading in the file and trying to write it
out.<br>
<br>
Here's my file:<br>
<br>
00012 benzene<br>
002 00002 2 00006 1 00007 1 00000 0 00000 0 00000 0 -000.696800 -001.210000
-000.001000 0 10
000.00000000.00000<br>
002 00001 2 00003 1 00008 1 00000 0 00000 0 00000 0 0000.699600 -001.208900
0000.000000 0 10
000.00000000.00000<br>
002 00002 1 00004 2 00009 1 00000 0 00000 0 00000 0 0001.396500 0000.001200
0000.001000 0 10
000.00000000.00000<br>
002 00003 2 00005 1 00010 1 00000 0 00000 0 00000 0 0000.697000 0001.209900
0000.001000 0 10
000.00000000.00000<br>
002 00004 1 00006 2 00011 1 00000 0 00000 0 00000 0 -000.699400 0001.208600
0000.000000 0 10
000.00000000.00000<br>
002 00001 1 00005 2 00012 1 00000 0 00000 0 00000 0 -001.396500 -000.001400
-000.001000 0 10
000.00000000.00000<br>
041 00001 1 00000 0 00000 0 00000 0 00000 0 00000 0 -001.247600 -002.165800
-000.001800 0 21
000.00000000.00000<br>
041 00002 1 00000 0 00000 0 00000 0 00000 0 00000 0 0001.252000 -002.163700
0000.000000 0 21 000.00000000.00000<br>
041 00003 1 00000 0 00000 0 00000 0 00000 0 00000 0 0002.499600 0000.002400
0000.001800 0 21 000.00000000.00000<br>
041 00004 1 00000 0 00000 0 00000 0 00000 0 00000 0 0001.247700 0002.165800
0000.001800 0 21 000.00000000.00000<br>
041 00005 1 00000 0 00000 0 00000 0 00000 0 00000 0 -001.252000 0002.163400
0000.000000 0 21 000.00000000.00000<br>
041 00006 1 00000 0 00000 0 00000 0 00000 0 00000 0 -002.499600 -000.002600
-000.001800 0 21 000.00000000.00000<br>
<br>
I read it in, and when I write it out to a new file, all I get is the
00012.<br>
<br>
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?<br>
<br>
TIA.<br>
<br>
<br>
<br<br<br<br<br>
<br<br>
</font></tt><a href="http://www.ccl.net/cgi-bin/ccl/send_ccl_message"><tt><font
size=2>http://www.ccl.net/cgi-bin/ccl/send_ccl_message</font></tt></a><tt><font
size=2><br>
<br<br>
</font></tt><a href="http://www.ccl.net/cgi-bin/ccl/send_ccl_message"><tt><font
size=2>http://www.ccl.net/cgi-bin/ccl/send_ccl_message</font></tt></a><tt><font
size=2><br>
<br<br>
</font></tt><a href=http://www.ccl.net/chemistry/sub_unsub.shtml><tt><font
size=2>http://www.ccl.net/chemistry/sub_unsub.shtml</font></tt></a><tt><font
size=2><br>
<br>
Before posting, check wait time at: </font></tt><a href=http://www.ccl.net/><tt><font size=2>http://www.ccl.net</font></tt></a><tt><font
size=2><br>
<br>
Job: </font></tt><a href=http://www.ccl.net/jobs><tt><font size=2>http://www.ccl.net/jobs</font></tt></a><tt><font
size=2>
<br>
Conferences: </font></tt><a href=http://server.ccl.net/chemistry/announcements/conferences/><tt><font
size=2>http://server.ccl.net/chemistry/announcements/conferences/</font></tt></a><tt><font
size=2><br>
<br>
Search Messages: </font></tt><a href=http://www.ccl.net/chemistry/searchccl/index.shtml><tt><font
size=2>http://www.ccl.net/chemistry/searchccl/index.shtml</font></tt></a><tt><font
size=2><br>
<br<br>
</font></tt><a href=http://www.ccl.net/spammers.txt><tt><font size=2>http://www.ccl.net/spammers.txt</font></tt></a><tt><font
size=2><br>
<br>
RTFI: </font></tt><a href=http://www.ccl.net/chemistry/aboutccl/instructions/><tt><font
size=2>http://www.ccl.net/chemistry/aboutccl/instructions/</font></tt></a><tt><font
size=2><br>
<br>
<br>
</font></tt>
<br>