Question about running fortran verison of LAMMPS

Hello,

I’m working on a CFD code written in Fortran and I wanna combine my code with LAMMPS. I have recently started to learn the LAMMPS and I’m not very familiar with this code. I downloaded the full source of fortran version of LAMMPS, 2001 and now I have all of the fortran files in the src. (The reason I’m working on the fortran version of LAMMPS is that my CFD code was written in Fortran as well).

For the first step, I read the manual about how to build executable file and running the LAMMPS (18 March 2015 Version). However, I don’t know how to compile all of the fortran file in source file of the LAMMPS to run this code? The compiler which I’m using is the Compaq Visual Fortran.

I appreciate if anybody can help me about my question and how can I approach to the LAMMPS for the MD simulation or any suggestion on how to combine it with my CFD code.

Regards,

Hamed.

I’m no expert by any means on combining LAMMPS with another big code, but depending on what you want to do, it may be easier to just use the C++ version of LAMMPS, compile it as a library, and link to it from Fortran. It seems to me like a bad idea to use a piece of software that has not been updated for 14 years… Just be very careful with the fract that Fortran stores multi-dimensional arrays in column-major while C uses row-major.

Hello,

I'm working on a CFD code written in Fortran and I wanna combine my code
with LAMMPS. I have recently started to learn the LAMMPS and I'm not very
familiar with this code. I downloaded the full source of fortran version of
LAMMPS, 2001 and now I have all of the fortran files in the src. (The
reason I'm working on the fortran version of LAMMPS is that my CFD code was
written in Fortran as well).

​the fortran version of LAMMPS is obsolete and unsupported. if you insist
on using it, you are on your own. the fact that your code is written in
fortran does not require you to use fortran for LAMMPS, there are C and
fortran bindings for the C++ version​ as well and with the ISO_C_BINDING
module in fortran 2003 and beyond you can interface cleanly to the C
bindings of the LAMMPS library (the fortran bindings in
example/COUPLE/fortran2 were built this way).

For the first step, I read the manual about how to build executable file

and running the LAMMPS (18 March 2015 Version). However, I don't know how
to compile all of the fortran file in source file of the LAMMPS to run this
code? The compiler which I'm using is the Compaq Visual Fortran.

​you are looking at the manual for a C++ version of LAMMPS, which has no
relevance to the fortran version.​

axel.