jonekoo / coarsemc Goto Github PK
View Code? Open in Web Editor NEWA Monte Carlo molecular simulation program for coarse-grained molecular models.
License: Other
A Monte Carlo molecular simulation program for coarse-grained molecular models.
License: Other
CoarseMC Quick Start Guide ------------------- Jouni Karjalainen [email protected] Introduction ------------ This is CoarseMC, a Monte Carlo simulation package for coarse-grained molecular models. The copyright belongs to Jouni Karjalainen for most of the code. See LICENSE file for copyright information. Building --------- Requirements: The program has been successfully compiled using Gnu Compiler Collection (GCC) 6.0.0 with OpenMPI 1.10.0, as well as Intel Parallel Studio XE versions 2015 and 2016, with Intel MPI 5.0.1 and 5.1.1, respectively. Older versions of the compilers may lack support for some Fortran 2003/2008 features used in the program. A C compiler is also needed to compile the included Cephes library. A POSIX-compliant Bourne-shell-like environment is expected in the build process, but not necessary. Python 2.7 with the ujson module (https://pypi.python.org/pypi/ujson) installed is recommended to run the scripts used to edit input/output files. If the distribution is cloned from the repository, also the GNU Autotools (Automake, Autoconf and Libtool) are needed. Cloning from repository: If coarsemc was cloned from the repository, the first step is to go to the cloned coarsemc directory where configure.ac is located and run autoreconf --install If some errors appear at this step, it is probably due to missing one of the GNU Autotools components (see Requirements). Compiling: Here we assume that the MPI wrappers for your Fortran and C compilers are called mpif90 and mpicc, respectively. The top folder of the package contains the script configure to configure the package before building it with make. Here are examples of configuring and building the package with GNU and Intel compilers: GCC: ./configure --prefix=yourinstallationpath FC=mpif90 \ FCFLAGS="-fno-range-check -O2 -fopenmp" CC=mpicc CFLAGS="-O2 -fopenmp" \ F77=mpif90 FFLAGS="-O2 -fopenmp" PYTHON=pathtopython2 make Intel: ./configure --prefix=yourinstallationpath FC=mpif90 \ FCFLAGS="-standard-semantics -O2 -openmp" CC=mpicc CFLAGS="-O2 -openmp" \ F77=mpif90 FFLAGS="-O2 -openmp" PYTHON=pathtopython2 make Note that the compiler flags "-standard-semantics" (Intel) and "-fno-range-check" (GNU) are mandatory. Giving the path to a Python 2.6 (or 2.7) installation is necessary only for running the python scripts, which include tests and examples. The --prefix option is also optional and needed only if you want to install the binaries with make install To see more configuration options, use command ./configure --help VPATH builds are supported so that one can do in the top directory for example: mkdir build cd build ../configure [the options as listed above] make Running: To run a simulation you need at least one input file. The Examples folder gives these for different systems. Assuming the input file input-0.json and the program binary coarsemc exist in the current folder, one can run the program with mpirun -np 1 ./coarsemc This will produce files output-0.json containing the snapshots (the trajectory) and restart-0.json, which is provided for restarting the simulation. More detailed information about the files and running a simulation can be found from the User Manual and the Examples folder. Package folders (in alphabetical order) --------------------------------------- cephes: Mathematical library of special functions. Used by the ljwall_interaction. claf90: Library for command-line parsing. Used by the main program. doxygen-doc: Created if doxygen is available Examples: Contains example input files for simulations. mt_stream_f90-1.11: Multiple Stream Mersenne Twister Pseudo-Random Number Generator src: The program source code and accompanied scripts for processing input and output files
At the moment there are no plans from my part to develop the code further but maybe somebody could find pieces of it useful. Anyway in the name of open science it would be nice to have the code available for anyone to see. Are there any issues why it should not be releaesed or things that should be fixed/removed before release @borbware ?
If the inputfile does not contain a box, the program segfaults. Should spit an error to guide the user. Similar to #2.
This would just be a cosmetic change to the code since the use of a separate group_names variable is a bit ugly. Not of high priority, though. Should not fix things which are not broken, but...
Could actually remove doxygen doc generation altogether and start using FORD.
At the moment the pFUnit is available in the repository but if at any stage the repository is about to be made public, the pFUnit must be removed since we do not have the right to distribute it along with our package. It would be nice though, if the user or (open source) developer could run the unit tests just by cloning the repository.
Often it is OK to use a default value and this should not yield a scary warning during initialization. An info message would be better.
Many routines that don't actually use the RNG have to pass it around and thus become dependent on at least the interface of the RNG. One could e.g. create a factory of RNG:s and each routine that really needs the RNG could then call the factory for a RNG or just ask for a random number. Maybe it is not even necessary to have separate generator instances for different threads. For MPI processes the separate instances are probably needed.
...since it is an ugly name.
In the case of an error occurring, there should be a systematic way to find out which part of the code raised the error, what was the possible cause, etc.
Should the analysis codes be added to this repository? Some of them depend heavily on the ptgbcyl package, some less so.
The replacement rules are
PTGBCYL -> CoarseMC
ptgbcyl -> coarsemc
When populating the cell list fails, for example Invalid cell index 0 1 0 and the particle coordinates and box is printed. This does not directly tell the user what could be done to prevent the error.
Now the requirement is python 2.6 or higher but actually the scripts don't work and were not meant to work with Python 3. Python 2 is already outdated and with probably small changes one could make all scripts compatible with Python 3.
particlegroup could be an internal class of nvt_engine, since nvt_engine knows about the internals of particlegroup anyway. nvt_engine could be named as nonbonded_system or decomposed system. One would not have to give the interactions to it, since the now the system would own them. Parts of the mc_engine would become parts of decomposed system. Not of high priority anyway.
I compiled the code from scratch (I was checked out to my separate "doublerod" branch with all the commits to master branch fetched on 23/6/2016).
I ran the configure script in a separate folder with the command
../ptgbcyl/gbcyl/configure FC=mpif90 FC=mpif90 FCFLAGS="-fno-range-check -O2 -fopenmp" CC=mpicc CFLAGS="-O2 -fopenmp" F77=mpif90 FFLAGS="-O2 -fopenmp"
After a successful make
command, I ran make dist
, and the compiler printed the following output:
https://dl.dropboxusercontent.com/u/22336072/sharetemp/makedist1.png
That is, it ran all the tests located at the "Tests" folder. Obviously, this shouldn't be happening.
This would hugely decrease disk space requirements for trajectories. Could also increase performance significantly when writing trajectories. The problem can of course be the portability of the files.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.