Coder Social home page Coder Social logo

atoms-ufrj / playmol Goto Github PK

View Code? Open in Web Editor NEW
17.0 7.0 5.0 1.82 MB

Playmol is a(nother) software for building molecular models

License: GNU General Public License v3.0

Makefile 1.21% Fortran 94.38% Shell 0.46% JavaScript 0.71% Python 3.23%
molecular-dynamics configuration packmol lammps openmm

playmol's Introduction

Playmol

DOI

Playmol is a(nother) software for building molecular models.

Its main distinguishing features are:

  • Molecules are created with simple scripts consisting of a small set of commands.
  • Molecular topology arises naturally when atoms are connected (automatic detection of angles and dihedrals).
  • Multiple copies of a molecule are automatically created when new coordinates are defined for their atoms.
  • Integration with Packmol provides a way of creating complex molecular systems.
  • Generation of LAMMPS and OpenMM files provides a way of performing efficient MD simulations.

Copyright: GNU Public License.

Author: Charlles R. A. Abreu
Applied Thermodynamics and Molecular Simulation Group (ATOMS)
Federal University of Rio de Janeiro, Brazil


Online Manual

The Playmol User Manual is available at:

http://atoms.peq.coppe.ufrj.br/playmol


Forum

A forum for Questions & Answers about Playmol is available at:

https://groups.google.com/forum/#!forum/playmol-users


Installation

Playmol is distributed as a git repository. To download it, just run:

git clone https://github.com/atoms-ufrj/playmol

To compile the source code and install Playmol in your system, you can do:

cd playmol
make
sudo make install

To update Playmol, enter the playmol directory and execute the following commands (including recompilation and reinstallation):

git pull
make
sudo make install

User's Manual

The Playmol User's Manual is available online here. You can also generate a local version if you have Doxygen (version 1.8 or later) installed in your system. If you do not have Doxygen, you can download and install it by:

wget http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.11.src.tar.gz
tar -zxvf doxygen-1.8.11.src.tar.gz
cd doxygen-1.8.11/
sudo apt-get install cmake flex bison
mkdir build && cd build/
cmake ../
make
sudo make install

In order to generate the local User's Manual, please go to the playmol directory and execute:

make doc

The manual will be available as a file playmol/doc/html/index.html, which you can open using your favorite web browser.


Using Playmol

Once Playmol is installed, you can execute a series of input scripts by typing:

playmol file-1 [file-2 ...]

This will execute the files in sequence as if they were a unique script. To execute the scripts one at a time, just run playmol multiple times.

Another way of runnig a playmol script is by starting it with the following line and then making it executable (e.g. via chmod +x):

#!/usr/local/bin/playmol

List of Playmol Commands

Here is a complete list of Playmol commands:

Command Description
define defines a variable for further substitution
for/next executes commands repeatedly while changing the value of a variable
if/then/else executes commands conditionally or selects between two command sequences
atom_type creates an atom type with given name and parameters
mass specifies the mass of atoms of a given type
diameter specifies the diameter of atoms of a given type
bond_type defines parameters for bonds between atoms of two given types
angle_type defines parameters for angles involving atoms of three given types
dihedral_type defines parameters for dihedrals involving atoms of four given types
improper_type defines parameters for impropers involving atoms of four given types
models defines whether the first attribute of each type is a model name
atom creates an atom with given name and type
charge specifies the charge of a given atom
bond creates chemical bonds and automatically detects angles and dihedrals
improper creates an improper involving four given atoms or search for impropers
rigid_body selects a set of atoms to be marked as a rigid body
mixing_rule defines mixing rules for pairs of atom types
extra creates an extra bond, angle, or dihedral involving given atoms
link links two atoms (and fuses their molecules) without actually bonding them
unlink removes an existing link (and splits the corresponding molecule)
build guesses atom positions from provided geometric information
prefix/suffix defines default prefixes or suffixes for atom types and atoms
box defines the properties of a simulation box
velocity defines parameters for generating Maxwell-Boltzmann atomic velocities
align aligns the principal axes of a molecule to the Cartesian axes
packmol executes Packmol in order to create a packed molecular system
write saves system info in different file formats (including LAMMPS and OpenMM)
include includes commands from another script
reset resets a list of entities together with its dependent lists
shell executes an external shell command
quit interrupts the execution of a Playmol script

The syntax and behavior of each command is described in the Playmol documentation.


Input Script Examples

Some input script examples are available in the playmol/examples directory.

playmol's People

Contributors

craabreu avatar gabriel-ms avatar iurisegtovich avatar pinheirothiagoj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

playmol's Issues

files in playmol/examples

I was trying to run playmol examples and got some problems:

  1. running 'alkanes':
    command: playmol alkanes.playmol
    ERROR: file alkanes.xyz not found

  2. 'carbohydrates/glycampdb2xyz'
    this is apparently a supplementary tool (a preprocessing with respect to playmol workflow)
    If that is correct, I would suggest placing these under playmol/tools for example.

  3. ionic liquids
    command: playmol emim_ntf2.mol
    ERROR: repeated atom type CF

  4. nC10
    command: playmol nC10.mol
    ERROR: invalid geometric info format

  5. water
    command: playmol water.mol
    success

I was intending to read through them, understand, and add a README.md for each example and comment lines in each script explaining why each command is used according to the manual.

I will be waiting your comments to continue investigating/commenting these examples and finally propose a pull request

thanks for considering this issue

command "model"

this command is present in the current manual and in old release ossociated with commit "7013bab on Jun 21, 2016" but absent in current release, has it become obsolete?

Error installation

Tentando reinstalar obtive o erro :

gfortran -O3 -march=native -ffast-math -funroll-loops -fstrict-aliasing -cpp -Wunused -J./src/obj -c -o src/obj/mString.o src/mString.f90
gfortran -O3 -march=native -ffast-math -funroll-loops -fstrict-aliasing -cpp -Wunused -J./src/obj -c -o src/obj/mStruc.o src/mStruc.f90
gfortran -O3 -march=native -ffast-math -funroll-loops -fstrict-aliasing -cpp -Wunused -J./src/obj -c -o src/obj/mCodeFlow.o src/mCodeFlow.f90
gfortran -O3 -march=native -ffast-math -funroll-loops -fstrict-aliasing -cpp -Wunused -J./src/obj -c -o src/obj/mFix.o src/mFix.f90
gfortran -O3 -march=native -ffast-math -funroll-loops -fstrict-aliasing -cpp -Wunused -J./src/obj -c -o src/obj/mMolecule.o src/mMolecule.f90
gfortran -O3 -march=native -ffast-math -funroll-loops -fstrict-aliasing -cpp -Wunused -J./src/obj -c -o src/obj/mPackmol.o src/mPackmol.f90
gfortran -O3 -march=native -ffast-math -funroll-loops -fstrict-aliasing -cpp -Wunused -J./src/obj -c -o src/obj/mPlaymol.o src/mPlaymol.f90
src/mPlaymol.f90: In function ‘tplaymol_read_geometry’:
src/mPlaymol.f90:685:0: internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:601
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-4.6/README.Bugs for instructions.
make: *** [src/obj/mPlaymol.o] Error 1

hybrid model detected - model name not getting trimmed

output is coming like

Pair Coeffs # hybrid

1 lj/cut/tip4p/long 0.0000 0.0000 # HW
2 lj/cut/tip4p/long 0.1852 3.1589 # OW
3 lj/cut/coul/long 0.0000 0.0000 # Heoh
4 lj/cut/coul/long 0.17 3.07 # Oeoh
5 lj/cut/coul/long 0.118 3.905 # CH2eoh
6 lj/cut/coul/long 0.207 3.775 # CH3eoh
7 lj/cut/tip4p/long 0.293082505 3.73 # CH4

Bond Coeffs # hybrid

1 zero 0.9572 # HW OW
2 harmonic 552.999522 0.945000 # Heoh Oeoh
3 harmonic 320.004780 1.410000 # Oeoh CH2eoh
4 harmonic 267.997132 1.529000 # CH2eoh CH3eoh

Angle Coeffs # hybrid

1 zero 104.52 # HW OW HW
2 harmonic 54.995220 108.500000 # Heoh Oeoh CH2eoh
3 harmonic 50.000000 109.500000 # Oeoh CH2eoh CH3eoh

instead of

Pair Coeffs # hybrid

1 0.0000 0.0000 # HW
2 0.1852 3.1589 # OW
3 0.0000 0.0000 # Heoh
4 0.17 3.07 # Oeoh
5 0.118 3.905 # CH2eoh
6 0.207 3.775 # CH3eoh
7 0.293082505 3.73 # CH4

Bond Coeffs # hybrid

1 0.9572 # HW OW
2 552.999522 0.945000 # Heoh Oeoh
3 320.004780 1.410000 # Oeoh CH2eoh
4 267.997132 1.529000 # CH2eoh CH3eoh

Angle Coeffs # hybrid

1 104.52 # HW OW HW
2 54.995220 108.500000 # Heoh Oeoh CH2eoh
3 50.000000 109.500000 # Oeoh CH2eoh CH3eoh

bug report no make install

quando o usuario possui mais de uma versão do gtk, o script passa 3 argumentos para a função cp

cp a b c

que significa copiar o arquivo a e o arquivo b para o diretorio c

mas no caso, os argumentos a b e c gerados pelo script são: a) o arquivo original, b) o arquivo destino no diretorio destino de uma versão do gtk, c) o arquivo destino no diretorio destino de outra versao do gtk

assim na ocorrencia de o usuario ter apenas uma versão do gtk o script faz "cp a b"
mas na ocorrencia de se ter 2 versoes ele faz "cp a b c" como extrapolação automatico do cenario nao planejado
e a extraplolação lógica para esse cenario poderia ser "cp a b; cp a c"

the error

atoms90@atoms90-H81M-H:~/playmol$ sudo make install 
[sudo] password for atoms90: 
cp -f ./bin/playmol /usr/local/bin
cp -f ./lib/packmol/packmol /usr/local/bin
sh -x ./highlight/install.sh
+ dirname ./highlight/install.sh
+ cd ./highlight
+ pwd
+ source=/home/atoms90/playmol/highlight/gtksourceview/playmol.lang
+ locate language-specs/def.lang
+ + sed s/def.lang/playmol.lang/g
grep usr
+ destination=/usr/share/gtksourceview-2.0/language-specs/playmol.lang
/usr/share/gtksourceview-3.0/language-specs/playmol.lang
+ [ -z /usr/share/gtksourceview-2.0/language-specs/playmol.lang
/usr/share/gtksourceview-3.0/language-specs/playmol.lang ]
+ which cp
+ command=/bin/cp -rf /home/atoms90/playmol/highlight/gtksourceview/playmol.lang /usr/share/gtksourceview-2.0/language-specs/playmol.lang
/usr/share/gtksourceview-3.0/language-specs/playmol.lang
+ echo /bin/cp -rf /home/atoms90/playmol/highlight/gtksourceview/playmol.lang /usr/share/gtksourceview-2.0/language-specs/playmol.lang /usr/share/gtksourceview-3.0/language-specs/playmol.lang
/bin/cp -rf /home/atoms90/playmol/highlight/gtksourceview/playmol.lang /usr/share/gtksourceview-2.0/language-specs/playmol.lang /usr/share/gtksourceview-3.0/language-specs/playmol.lang
+ eval /bin/cp -rf /home/atoms90/playmol/highlight/gtksourceview/playmol.lang /usr/share/gtksourceview-2.0/language-specs/playmol.lang /usr/share/gtksourceview-3.0/language-specs/playmol.lang
+ /bin/cp -rf /home/atoms90/playmol/highlight/gtksourceview/playmol.lang /usr/share/gtksourceview-2.0/language-specs/playmol.lang /usr/share/gtksourceview-3.0/language-specs/playmol.lang
/bin/cp: target ‘/usr/share/gtksourceview-3.0/language-specs/playmol.lang’ is not a directory
make: *** [install] Error 1

PlaymolTools: GAFF parameters

PlaymolTools: The energy parameters for bond and angle of GAFF should not be divided by 2 in the file playmoltools.py

good coordinates in lammpstrj file / bad coordinates in lmp/models data file

in lammpstrj

a-uid m-uid a-type x y z
12264 4430 CH3eoh 13.6460009 11.4874668 -84.1789017
12265 4430 CH2eoh 14.9055471 12.2065182 -83.9393005
12266 4430 Oeoh 15.1533661 13.0910788 -85.0089951
12267 4430 Heoh 15.9630671 13.5533257 -84.8549652

in lammps data

a-uid m-uid a-type charge x y z #a-type
12264 4430 6 0.000 15.9630671 13.5533257 -84.8549652 # CH3eoh
12265 4430 5 0.265 13.6460009 11.4874668 -84.1789017 # CH2eoh
12266 4430 4 -0.700 14.9055471 12.2065182 -83.9393005 # Oeoh
12267 4430 3 0.435 15.1533661 13.0910788 -85.0089951 # Heoh

names are ok like

Ch3 Ch2 O H

so molecule is like

      3---2
           \
            O---H

but actual xyz are like

Ch2 O H CH3

so molecule is like

             *slightly stretched bonds here
            2---O *and here
            '    \  *no bond here
            '     H   3
            '         '
            '---------'
            *ultra stretched bond here!

all left shifted 1 position, first becomes last

I'm getting a minimal case ready and will investigate

bug in highlight/install.sh

hello,
I had a problem installing playmol on a fresh ubuntu 18.04 (@jcslmaciel),
I believe the problem was that the install script tried to run "sudo cp -rf /home/jessica/playmol/highlight/gtksourceview/playmol.lang /snap/gnome-3-26-1604/59/usr/share/gtksourceview-3.0/language-specs/playmol.lang" instead of "sudo cp -rf /home/jessica/playmol/highlight/gtksourceview/playmol.lang /usr/share/gtksourceview-3.0/language-specs/playmol.lang" which I believe is the correct command based on comparison with past successfl nstallations.
the erroneous command was generated by chance as the locate command found the /snap dir before finding the /usr/share... dir, and the snap dir does have a "usr/share/gtksourceview-3.0/language-specs/playmol.lang" subdir inside.
when running the erroneous cmmandI go the error messag something like "cannot copy regular file, read-only file system", I a not sure what is the /snap dir is.

command "xyz"

looking at the code it seems to me that the commands "xyz" and "build" are equivalent
but i could not find reference to the command keyword "xyz" in the manual
should we remove "xyz" from the code or include it in the manual?

Interrupção no execute

Tentando criar o framewok de uma zeólita LTA escrevi o código no playmol que está em anexo.

Ele lê as atribuições, o build pelo arquivo e fixa todos os átomos sem problema. Inclusive se rodar sem o execute, a zeólita é montada (conferido com o vmd). Mas quando tento o execute pra usar o pack pra copiar moléculas de água na caixa, ele interrompe o código sem terminá-lo.
LTA_Crash.playmol.tar.gz

internal compiler error ( 1 workaround suggested )

ERROR

segtovichisv@segtovichisv-vb-lubuntu-scicomp:~/ProgramFiles/Playmol/playmol$ make
gfortran -O3 -march=native -ffast-math -funroll-loops -fstrict-aliasing -cpp -Wunused -J./src/obj -c -o src/obj/mMolecule.o src/mMolecule.f90
src/mMolecule.f90:440:0:

       forall (i=1:N) Coord(:,i) = matmul( A, delta(:,i) )
 
internal compiler error: in gfc_trans_forall_1, at fortran/trans-stmt.c:4388
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
Makefile:53: recipe for target 'src/obj/mMolecule.o' failed
make: *** [src/obj/mMolecule.o] Error 1

GFORTRAN VERSION

segtovichisv@segtovichisv-vb-lubuntu-scicomp:~/ProgramFiles/Playmol/playmol$ gfortran --version
GNU Fortran (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

TRIAL 1 -- changing Makefile

  • from
    FOPTS = -O3 -march=native -ffast-math -funroll-loops -fstrict-aliasing -cpp -Wunused
  • to
    FOPTS = -g -cpp -fcheck=all

RESULT

segtovichisv@segtovichisv-vb-lubuntu-scicomp:~/ProgramFiles/Playmol/playmol$ make
gfortran -g -cpp -fcheck=all -J./src/obj -c -o src/obj/mMolecule.o src/mMolecule.f90
gfortran -g -cpp -fcheck=all -J./src/obj -c -o src/obj/mParser.o src/mParser.f90
gfortran -g -cpp -fcheck=all -J./src/obj -c -o src/obj/mCodeFlow.o src/mCodeFlow.f90
gfortran -g -cpp -fcheck=all -J./src/obj -c -o src/obj/mPackmol.o src/mPackmol.f90
gfortran -g -cpp -fcheck=all -J./src/obj -c -o src/obj/mPlaymol.o src/mPlaymol.f90
gfortran -g -cpp -fcheck=all -J./src/obj -c -o src/obj/playmol.o src/playmol.f90
cd ./lib && make
make[1]: Entering directory '/home/segtovichisv/ProgramFiles/Playmol/playmol/lib'
tar -zxvf packmol-15.287.tar.gz
./packmol/
./packmol/solvate.tcl
./packmol/feasy.f90
./packmol/fgcommon.f90
./packmol/initial.f90
./packmol/molpa.f90
./packmol/gencan.f
./packmol/sizes.f90
./packmol/header
./packmol/pgencan.f90
./packmol/LICENSE
./packmol/io.f90
./packmol/geasyparallel.f90
./packmol/Makefile.default
./packmol/COPYING
./packmol/compindexes.f90
./packmol/geasy.f90
./packmol/heuristics.f90
./packmol/AUTHORS
./packmol/feasyparallel.f90
./packmol/ppackmol
./packmol/configure
./packmol/Makefile
./packmol/polartocart.f90
./packmol/packmol.f90
./packmol/usegencan.f90
./packmol/cenmass.f90
cd packmol && sed -i 's/\r//g' *.f90 && patch < ../packmol.patch && make && make lib
patching file initial.f90
patching file io.f90
patching file main.f90
patching file Makefile
patching file Makefile.default
patching file packmol.f90
make[2]: Entering directory '/home/segtovichisv/ProgramFiles/Playmol/playmol/lib/packmol'
 ------------------------------------------------------ 
 Compiling packmol with /usr/bin/gfortran 
 Flags: -O3 -ffast-math  
 ------------------------------------------------------ 
 ------------------------------------------------------ 
 Packmol succesfully built.
 ------------------------------------------------------ 
make[2]: Leaving directory '/home/segtovichisv/ProgramFiles/Playmol/playmol/lib/packmol'
make[2]: Entering directory '/home/segtovichisv/ProgramFiles/Playmol/playmol/lib/packmol'
 ------------------------------------------------------ 
 Compiling packmol with /usr/bin/gfortran 
 Flags: -O3 -ffast-math  
 ------------------------------------------------------ 
 ------------------------------------------------------ 
 Packmol succesfully built. Static library available. 
 ------------------------------------------------------ 
make[2]: Leaving directory '/home/segtovichisv/ProgramFiles/Playmol/playmol/lib/packmol'
mv packmol/libpackmol.a ./
make[1]: Leaving directory '/home/segtovichisv/ProgramFiles/Playmol/playmol/lib'
mkdir -p ./bin
gfortran -g -cpp -fcheck=all -J./src/obj -o bin/playmol src/obj/mBox.o src/obj/mFix.o src/obj/mMolecule.o src/obj/mParser.o src/obj/mString.o src/obj/mCodeFlow.o src/obj/mGlobal.o src/obj/mPackmol.o src/obj/mPlaymol.o src/obj/mStruc.o src/obj/playmol.o lib/libpackmol.a

MORE ALTERNATIVES

[FAILS] FOPTS = -O2 -march=native -ffast-math -funroll-loops -fstrict-aliasing -cpp -Wunused


[FAILS] FOPTS = -O1 -march=native -ffast-math -funroll-loops -fstrict-aliasing -cpp -Wunused


[BUILDS] FOPTS = -O0 -march=native -ffast-math -funroll-loops -fstrict-aliasing -cpp -Wunused

Installation problems on Mac

I get the error message below when installing on MacOS. It looks like it is searching for gfortran in /usr/bin instead of in /usr/local/bin?

cd ./lib && make
make -C packmol/ lib
make[2]: /usr/bin/gfortran: No such file or directory
make[2]: *** [sizes.o] Error 1
make[1]: *** [all] Error 2

fails installation in linux 32

i believe the flag -m64 wont allow building on linux 32
removing it and running make clean-all and make worked
maybe configure the Makefile to handle such cases automatically

assignee @iurisegtovich

remove obsolete branch "manual"

I believe a contributor with higher privileges has to go into playmol/branches and click the trash bin "Delete this branch" to remove it from the remote.

Any contributor might want to do git branch -d manual to get rid of it locally too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.