Fortran Formatting Computational Chemistry

In summary, the user is having trouble with formatting in a quantum chemistry calculation program. They have checked tutorials but are still unable to properly format the output. The program is supposed to take a user input and output it in a specific format, but instead it just outputs asterisks. The user is looking for help with extracting data from an ascii file using specific row and column numbers.
  • #1
Morberticus
85
0
Hi,

I require specific formatting for a quantum chemistry calculation. But for some reason I can't seem to write using formatting. I have checked tutorials, but to no avail. Here is my toy program:

program test_format
implicit none

real :: m

write(*,*) 'Enter a number'
read(*,*) m
write(*,fmt='(d4.2)') m

end program test_format

After the user inputs a number, the program simply outputs stars: ****.

Any help would be greatly appreciated.

Thanks
 
Technology news on Phys.org
  • #2
in the format Dz.d, the number d is the number of decimals after the point, the number z is the total length of the number, including the exponent, sign etc. Hence z>=d+7. If not, you get ***.
 
  • #3
I have a problem, here's what the,
should be from ascii file to extract data that is the n-th row and n-th column
I do not know how. Could someone help me.
 

Related to Fortran Formatting Computational Chemistry

1. What is Fortran Formatting Computational Chemistry?

Fortran Formatting Computational Chemistry is a programming language that is widely used in the field of computational chemistry. It is a specialized version of the Fortran programming language that is specifically designed for performing calculations and simulations in chemistry. This language allows scientists to write and execute complex computational chemistry algorithms and models that are essential for understanding chemical processes and properties.

2. Why is Fortran Formatting Computational Chemistry important?

Fortran Formatting Computational Chemistry is important because it allows scientists to perform complex calculations and simulations that are crucial for understanding and predicting chemical properties and reactions. This language is specifically designed for scientific computing, making it a powerful tool for chemists to use in their research.

3. How is Fortran Formatting Computational Chemistry different from regular Fortran?

Fortran Formatting Computational Chemistry is different from regular Fortran in several ways. Firstly, it contains specialized functions and subroutines that are tailored for performing calculations and simulations in chemistry. It also has specific formatting rules and conventions that are optimized for scientific computing. Additionally, Fortran Formatting Computational Chemistry often utilizes external libraries and modules that are specifically designed for computational chemistry.

4. What are the advantages of using Fortran Formatting Computational Chemistry?

There are several advantages to using Fortran Formatting Computational Chemistry. Firstly, it is a highly efficient and fast language, making it ideal for performing complex calculations and simulations. It also has a large and active user community, meaning there are plenty of resources and support available for users. Additionally, its specialized functions and formatting rules make it easier for scientists to write and execute complex computational chemistry algorithms.

5. Are there any drawbacks to using Fortran Formatting Computational Chemistry?

While Fortran Formatting Computational Chemistry has many advantages, there are also some drawbacks to consider. Firstly, it can be a challenging language for beginners to learn, as it requires a strong understanding of both Fortran and computational chemistry principles. Additionally, it may not be the best choice for all types of scientific computing, as other languages may be better suited for certain tasks. However, for computational chemistry specifically, Fortran Formatting Computational Chemistry is a highly valuable and widely used tool.

Similar threads

  • Programming and Computer Science
Replies
4
Views
691
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
6
Views
2K
  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
29
Views
3K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
  • Programming and Computer Science
Replies
13
Views
2K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
26
Views
3K
Back
Top