vitroid / genice Goto Github PK
View Code? Open in Web Editor NEWA swiss army knife to generate proton-disordered ice structures.
License: MIT License
A swiss army knife to generate proton-disordered ice structures.
License: MIT License
Hi,
it seems the sH clathrate structure doesn't include the cages information in genice/lattices/sH.py
so it won't have guest molecules in the generated structure.
(This was my command line:
genice --rep 2 2 2 --seed 0 --format=exyz --water tip3p -g 12=ch4 sH
)
I was wondering if the information for the cages could be added.
Many thanks,
Eszter
Hello there, a very nice and helpful programme you have made, thank you!
I'm not sure whether there is a fundamental reason behind it, but when I'm trying to produce a single ice 3 structure using "genice ice3 > test.gro" it gets stuck at "INFO Net polarization: [0.00 -0.00 2.00]". It's working fine when I include '--rep 2 2 2' or '--rep 3 3 3'. If there is a fundamental reason behind it, I guess it would be useful with a warning like on ice 7 and 8, when trying to produce a single cell. I've attached the output at the bottom FYI.
Thanks a lot!
//Tor
genice ice3 > test.gro
INFO Load lattice module 'ice3', arguments []
INFO
INFO Command line: /anaconda3/bin/genice ice3
INFO No rotmatrices in lattice
INFO Cell dimension:
INFO a = 6.666
INFO b = 6.666
INFO c = 6.936
INFO A = 90.0
INFO B = 90.0
INFO C = 90.0
INFO HB connectivity is not defined.
INFO Bond length (specified): 3.0
INFO Target Density: 1.165
INFO Original Density: 0.0011637864512692793
INFO Bond length (scaled, nm): 0.2998957965366282
INFO Load format module 'gromacs', arguments []
INFO Stage1: Replication.
INFO Number of water molecules: 12
INFO Pairs are not given explicitly.
INFO Estimating the bonds according to the pair distances.
INFO Number of water nodes: 12
INFO Cell dimension:
INFO a = 0.6663684599043879
INFO b = 0.6663684599043879
INFO c = 0.6933590815926843
INFO A = 90.0
INFO B = 90.0
INFO C = 90.0
INFO Stage1: end.
INFO Stage2: Graph preparation.
INFO Number of pre-oriented hydrogen bonds: 0
INFO Number of unoriented hydrogen bonds: 24
INFO Number of hydrogen bonds: 24 (regular num: 24)
INFO Stage2: end.
INFO Stage3: Bernal-Fowler rule.
INFO Defects remaining: 11
INFO Defects remaining: 8
INFO Defects remaining: 4
INFO Defects remaining: 2
INFO Defects remaining: 1
INFO Defects remaining: 0
INFO Stage3: end.
INFO Stage4: Depolarization.
INFO Non Z4: []
INFO Net polarization: [-2.00 2.00 2.00]
INFO Net polarization: [0.00 2.00 2.00]
INFO Net polarization: [0.00 -0.00 2.00]
^CTraceback (most recent call last):
File "/anaconda3/bin/genice", line 8, in
sys.exit(main())
File "/anaconda3/lib/python3.6/site-packages/genice/main.py", line 114, in main
depolarize=depolarize,
File "/anaconda3/lib/python3.6/site-packages/genice/genice.py", line 765, in generate_ice
record_depolarization_path=record_depolarization_path)
File "/anaconda3/lib/python3.6/site-packages/genice/genice.py", line 959, in stage4
dg.depolarize(self.spacegraph, self.repcell.mat, draw=None)
File "/anaconda3/lib/python3.6/site-packages/genice/digraph.py", line 501, in depolarize
cycle = traversing_cycle(spaceicegraph, cell, axis, draw)
File "/anaconda3/lib/python3.6/site-packages/genice/digraph.py", line 405, in traversing_cycle
logger.debug("Dipole of the path2: {0}".format(spaceicegraph.dipole_moment(path2)))
File "/anaconda3/lib/python3.6/site-packages/genice/digraph.py", line 319, in dipole_moment
for i in range(len(order) - 1):
KeyboardInterrupt
INFO Completed.
When generating a .gro file of an Ih ice slab with a tip4p water model using genice the coordinates system were switched around such that what was x should be y what was y should be z and what was z should be x.
Using this exact code in Colab:
from genice2.genice import GenIce
from genice2.plugin import Lattice, Format, Molecule
lattice = Lattice("Ih")
formatter = Format("gromacs")
water = Molecule("tip4p")
ice = GenIce(lattice, rep=[8,8,6]).generate_ice(water, formatter)
print(ice)
Visualizing this file in VMD the basal facet (which should be in the z direction) was in the y direction
Hello dr. Masakazu Matsumoto, I would like to report a bug when generating some ices.
Here's a list of the ices:
When I generate ice2
, I get the output:
ruslan@neptunus:~/Documents/genice-test$ genice2 ice2 --rep 3 3 3 --seed 1234 --format gromacs --water ice --depol=optimal > conf.gro
INFO main: end.
INFO main: 403 ms
Traceback (most recent call last):
File "/home/ruslan/.local/bin/genice2", line 8, in <module>
sys.exit(main())
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/decorators.py", line 14, in _time_it
return func(*args, **kwargs)
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/decorators.py", line 34, in _banner
return func(*args, **kwargs)
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/cli/genice.py", line 201, in main
lat = GenIce(safe_import("lattice", lattice_type).Lattice(**lattice_options),
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/lattices/ice2.py", line 60, in __init__
self.waters, self.fixed = CIF.waters_and_pairs(self.cell, atomd, sops)
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/CIF.py", line 125, in waters_and_pairs
for i, j in pl.pairs_iter(oxygens,
TypeError: pairs_iter() got an unexpected keyword argument 'rc'
ruslan@neptunus:~/Documents/genice-test$
I also tried some tests using the cif
and zeolite
plugins, getting the following output:
zeolite
ruslan@neptunus:~/Documents/genice-test$ genice2 zeolite[EDI] --rep 3 3 3 --seed 1234 --format gromacs --water ice --depol=optimal > conf.gro
INFO Extra lattice plugin: zeolite
INFO EDI
INFO Input: EDI.cif
WARNING could not convert "T1" into element name!
WARNING could not convert "T2" into element name!
INFO Loaded a CIF file with 5 atom coordinates and 8 symmetry operations.
INFO Created a unit cell consisting of 15 atoms.
INFO Fractional coordinates:
INFO T2 0.000 0.000 0.500
INFO T1 0.000 0.732 0.882
INFO T1 0.732 0.000 0.118
INFO T1 0.000 0.268 0.882
INFO T1 0.268 0.000 0.118
INFO O 0.000 0.500 0.882
INFO O 0.190 0.810 0.000
INFO O 0.810 0.810 0.000
INFO O 0.810 0.190 0.000
INFO O 0.000 0.810 0.645
INFO O 0.810 0.000 0.355
INFO O 0.000 0.190 0.645
INFO O 0.500 0.000 0.118
INFO O 0.190 0.190 0.000
INFO O 0.190 0.000 0.355
INFO Cell volume: 307.48434116 (calc.), 0 (data)
INFO __init__: Constructor of GenIce.
INFO
INFO Command line: /home/ruslan/.local/bin/genice2 zeolite[EDI] --rep 3 3 3 --seed 1234 --format gromacs --water ice --depol=optimal
INFO No rotmatrices in lattice
INFO Cell dimension:
INFO a = 6.926
INFO b = 6.926
INFO c = 6.41
INFO A = 90.0
INFO B = 90.0
INFO C = 90.0
INFO HB connectivity is not defined.
INFO __init__: end.
INFO __init__: 3 ms
INFO main: end.
INFO main: 1355 ms
Traceback (most recent call last):
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/genice.py", line 534, in __init__
self.bondlen = lat.bondlen
AttributeError: 'Lattice' object has no attribute 'bondlen'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ruslan/.local/bin/genice2", line 8, in <module>
sys.exit(main())
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/decorators.py", line 14, in _time_it
return func(*args, **kwargs)
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/decorators.py", line 34, in _banner
return func(*args, **kwargs)
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/cli/genice.py", line 201, in main
lat = GenIce(safe_import("lattice", lattice_type).Lattice(**lattice_options),
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/decorators.py", line 14, in _time_it
return func(*args, **kwargs)
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/decorators.py", line 34, in _banner
return func(*args, **kwargs)
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/genice.py", line 540, in __init__
p = pl.pairs_iter(self.waters,
TypeError: pairs_iter() got an unexpected keyword argument 'rc'
INFO Completed.
ruslan@neptunus:~/Documents/genice-test$
cif
ruslan@neptunus:~/Documents/genice-test$ genice2 cif[EDI.cif] --rep 3 3 3 --seed 1234 --format gromacs --water ice --depol=optimal > conf.gro
INFO Extra lattice plugin: cif
INFO EDI.cif
INFO Input: EDI.cif
WARNING could not convert "T1" into element name!
WARNING could not convert "T2" into element name!
INFO Loaded a CIF file with 5 atom coordinates and 8 symmetry operations.
INFO Created a unit cell consisting of 15 atoms.
INFO Fractional coordinates:
INFO T2 0.000 0.000 0.500
INFO T1 0.000 0.732 0.882
INFO T1 0.732 0.000 0.118
INFO T1 0.000 0.268 0.882
INFO T1 0.268 0.000 0.118
INFO O 0.000 0.500 0.882
INFO O 0.190 0.810 0.000
INFO O 0.810 0.810 0.000
INFO O 0.810 0.190 0.000
INFO O 0.000 0.810 0.645
INFO O 0.810 0.000 0.355
INFO O 0.000 0.190 0.645
INFO O 0.500 0.000 0.118
INFO O 0.190 0.190 0.000
INFO O 0.190 0.000 0.355
INFO Cell volume: 307.48434116 (calc.), 0 (data)
INFO __init__: Constructor of GenIce.
INFO
INFO Command line: /home/ruslan/.local/bin/genice2 cif[EDI.cif] --rep 3 3 3 --seed 1234 --format gromacs --water ice --depol=optimal
INFO No rotmatrices in lattice
INFO Cell dimension:
INFO a = 6.926
INFO b = 6.926
INFO c = 6.41
INFO A = 90.0
INFO B = 90.0
INFO C = 90.0
INFO HB connectivity is not defined.
INFO __init__: end.
INFO __init__: 2 ms
INFO main: end.
INFO main: 332 ms
Traceback (most recent call last):
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/genice.py", line 534, in __init__
self.bondlen = lat.bondlen
AttributeError: 'Lattice' object has no attribute 'bondlen'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ruslan/.local/bin/genice2", line 8, in <module>
sys.exit(main())
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/decorators.py", line 14, in _time_it
return func(*args, **kwargs)
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/decorators.py", line 34, in _banner
return func(*args, **kwargs)
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/cli/genice.py", line 201, in main
lat = GenIce(safe_import("lattice", lattice_type).Lattice(**lattice_options),
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/decorators.py", line 14, in _time_it
return func(*args, **kwargs)
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/decorators.py", line 34, in _banner
return func(*args, **kwargs)
File "/home/ruslan/.local/lib/python3.8/site-packages/genice2/genice.py", line 540, in __init__
p = pl.pairs_iter(self.waters,
TypeError: pairs_iter() got an unexpected keyword argument 'rc'
INFO Completed.
ruslan@neptunus:~/Documents/genice-test$
Love genice!
And it seems to be working beautifully for most of the ices, but I seem to be running to a problem with some ices.
I am on a macOS 11.4 - not sure if makes a difference?
(base) ~/D/s/f/ices ❯❯❯ genice2 prism
INFO Prism ice with 6 sides and 10 rows.
INFO __init__: Constructor of GenIce.
INFO
INFO Generate a prism ice.
INFO
INFO Options:
INFO rows=r
INFO sides=s
INFO
INFO
INFO Command line: /Users/valentina/opt/anaconda3/bin/genice2 prism
INFO No rotmatrices in lattice
INFO Cell dimension:
INFO a = 55.0
INFO b = 55.0
INFO c = 27.5
INFO A = 90.0
INFO B = 90.0
INFO C = 90.0
INFO HB connectivity is not defined.
INFO Bond length (specified): 3
INFO Target Density: 0.0215588172693113
INFO Original Density: 2.1558817269311263e-05
INFO Bond length (scaled, nm): 0.2999999999999998
INFO __init__: end.
INFO __init__: 2 ms
INFO Stage1: Replicate water molecules to make a repeated cell.
INFO Number of water molecules: 60
INFO Pairs are not given explicitly.
INFO Estimating the bonds according to the pair distances.
INFO Number of water nodes: 60
INFO Cell dimension:
INFO a = 5.499999999999997
INFO b = 5.499999999999997
INFO c = 2.7499999999999987
INFO A = 90.0
INFO B = 90.0
INFO C = 90.0
INFO Stage1: end.
INFO Stage1: 3 ms
INFO Stage2: Make a random graph and replicate.
INFO Stage2: end.
INFO Stage2: 2 ms
INFO Number of pre-oriented hydrogen bonds: 0
INFO Number of unoriented hydrogen bonds: 120
INFO Number of hydrogen bonds: 120 (regular num: 120)
INFO Stage3D: Tile the graph with directed cycles.
INFO spanningCycles: Look up the traversal cycles.
INFO spanningCycles: end.
INFO spanningCycles: 1 ms
INFO direct: Re-orient the cycles so as to minimize the net polarization.
INFO direct: end.
INFO direct: 0 ms
INFO Stage3D: end.
INFO Stage3D: 2 ms
INFO main: end.
INFO main: 23 ms
Traceback (most recent call last):
File "/Users/valentina/opt/anaconda3/bin/genice2", line 8, in <module>
sys.exit(main())
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/decorators.py", line 14, in _time_it
return func(*args, **kwargs)
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/decorators.py", line 34, in _banner
return func(*args, **kwargs)
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/cli/genice.py", line 252, in main
result = lat.generate_ice(water=water,
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/genice.py", line 759, in generate_ice
abort = Stages()
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/genice.py", line 720, in Stages
self.Stage3D()
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/decorators.py", line 14, in _time_it
return func(*args, **kwargs)
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/decorators.py", line 34, in _banner
return func(*args, **kwargs)
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/genice.py", line 1057, in Stage3D
dir = direct(dipoles, spanning)
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/decorators.py", line 14, in _time_it
return func(*args, **kwargs)
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/decorators.py", line 34, in _banner
return func(*args, **kwargs)
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/genice.py", line 1016, in direct
pol2 = pol @ pol
TypeError: unsupported operand type(s) for @: 'numpy.float64' and 'numpy.float64'
INFO Completed.
(base) ~/D/s/f/ices ❯❯❯ genice2 one ✘ 1
INFO main: end.
INFO main: 4 ms
Traceback (most recent call last):
File "/Users/valentina/opt/anaconda3/bin/genice2", line 8, in <module>
sys.exit(main())
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/decorators.py", line 14, in _time_it
return func(*args, **kwargs)
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/decorators.py", line 34, in _banner
return func(*args, **kwargs)
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/cli/genice.py", line 214, in main
safe_import(
File "/Users/valentina/opt/anaconda3/lib/python3.8/site-packages/genice2/lattices/one.py", line 31, in __init__
for ch in arg:
UnboundLocalError: local variable 'arg' referenced before assignment
bug:when generating 6site-ice ,the structual of water molecule is wrong
usage: genice --water 6site --format g Ih > 6siteIh16.gro
I found the distance between O and other atom in the same 6site-water molecule is ten times that of correct one.
Dear Professor Masakazu Matsumoto
First Thank you so much to develop such a package to generate ice structure. It is very helpful for people who wants to do some work about simulations on clathrate hydrates and ice lattices, especially for me, a complete beginner.
But actually I have some trouble at the very beginning, that is to install the GenIce package on my computer (Window 10). I use Python 3.5, "pip3 install GenIce", and everything is Ok, but the package " Pairlist "that GenIce needed can not be installed successfully. I try my best to Google the issue and find the possible answer, but failed. I dont know where I was wrong. Is it the problem of the environment of my computer, or something else?
Thank you for taking your time and hope your valuable advice.
ps: i guess that using the pairlist. whl to install is a solver, but i see on https://pypi.org/ there is only .whl for macosx. no a window type.
Here is the Error information when i installed GenIce:
ERROR: Failed building wheel for pairlist
Running setup.py clean for pairlist
Failed to build pairlist
Installing collected packages: pairlist, GenIce
Running setup.py install for pairlist ... error
ERROR: Command errored out with exit status 1:
command: 'd:\ana\envs\python35\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ADMINI1\AppData\Local\Temp\pip-install-k93z0ykf\pairlist\setup.py'"'"'; file='"'"'C:\Users\ADMINI1\AppData\Local\Temp\pip-install-k93z0ykf\pairlist\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\ADMINI1\AppData\Local\Temp\pip-record-2s0kfk7e\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\ana\envs\python35\Include\pairlist'1\AppData\Local\Temp\pip-install-k93z0ykf\pairlist
cwd: C:\Users\ADMINI
Complete output (56 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
copying pairlist.py -> build\lib.win-amd64-3.5
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
building 'cpairlist' extension
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\ana\envs\python35\lib\site-packages\numpy\core\include -Id:\ana\envs\python35\include -Id:\ana\envs\python35\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tccpairlist.c /Fobuild\temp.win-amd64-3.5\Release\cpairlist.obj -std=c99
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\ana\envs\python35\lib\site-packages\numpy\core\include -Id:\ana\envs\python35\include -Id:\ana\envs\python35\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcpairlist.c /Fobuild\temp.win-amd64-3.5\Release\pairlist.obj -std=c99
cl : Command line warning D9002 : ignoring unknown option '-std=c99'
pairlist.c
pairlist.c: warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
pairlist.c(106): error C2057: expected constant expression
pairlist.c(106): error C2466: cannot allocate an array of constant size 0
pairlist.c(106): error C2133: 'nResidents': unknown size
pairlist.c(114): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(122): error C2057: expected constant expression
pairlist.c(122): error C2466: cannot allocate an array of constant size 0
pairlist.c(122): error C2133: 'residents': unknown size
pairlist.c(123): error C2057: expected constant expression
pairlist.c(123): error C2466: cannot allocate an array of constant size 0
pairlist.c(123): error C2133: 'heads': unknown size
pairlist.c(124): error C2057: expected constant expression
pairlist.c(124): error C2466: cannot allocate an array of constant size 0
pairlist.c(124): error C2133: 'pointer': unknown size
pairlist.c(137): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(245): error C2057: expected constant expression
pairlist.c(245): error C2466: cannot allocate an array of constant size 0
pairlist.c(245): error C2133: 'nResidents0': unknown size
pairlist.c(246): error C2057: expected constant expression
pairlist.c(246): error C2466: cannot allocate an array of constant size 0
pairlist.c(246): error C2133: 'nResidents1': unknown size
pairlist.c(256): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(268): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(279): error C2057: expected constant expression
pairlist.c(279): error C2466: cannot allocate an array of constant size 0
pairlist.c(279): error C2133: 'pointer': unknown size
pairlist.c(282): error C2057: expected constant expression
pairlist.c(282): error C2466: cannot allocate an array of constant size 0
pairlist.c(282): error C2133: 'residents0': unknown size
pairlist.c(283): error C2057: expected constant expression
pairlist.c(283): error C2466: cannot allocate an array of constant size 0
pairlist.c(283): error C2133: 'heads0': unknown size
pairlist.c(297): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(303): error C2057: expected constant expression
pairlist.c(303): error C2466: cannot allocate an array of constant size 0
pairlist.c(303): error C2133: 'residents1': unknown size
pairlist.c(304): error C2057: expected constant expression
pairlist.c(304): error C2466: cannot allocate an array of constant size 0
pairlist.c(304): error C2133: 'heads1': unknown size
pairlist.c(321): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\ana\envs\python35\lib\site-packages\numpy\core\include -Id:\ana\envs\python35\include -Id:\ana\envs\python35\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcpairlist.c /Fobuild\temp.win-amd64-3.5\Release\pairlist.obj -std=c99" failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\ana\envs\python35\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ADMINI1\AppData\Local\Temp\pip-install-k93z0ykf\pairlist\setup.py'"'"'; file='"'"'C:\Users\ADMINI1\AppData\Local\Temp\pip-install-k93z0ykf\pairlist\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\ADMINI~1\AppData\Local\Temp\pip-record-2s0kfk7e\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\ana\envs\python35\Include\pairlist' Check the logs for full command output.
I‘m using GenIce2 to generate structure files for a series of ice, and it has been very helpful for my work. Now I also need to generate structures for ice XIV. Could support for ice XIV be added to GenIce2?
Many thanks to this useful tool!
I am trying to install the GenIce package to python in windows using the pip3 install genice2 but it fails. here is the error message: (can you please assist). Many Thanks.
Collecting genice2
Using cached GenIce2-2.1.7-py2.py3-none-any.whl
Requirement already satisfied: yaplotlib>=0.1 in c:\users\100047903\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from genice2) (0.1.2)
Requirement already satisfied: wheel in c:\users\100047903\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from genice2) (0.40.0)
Collecting cycless
Using cached cycless-0.2-py2.py3-none-any.whl (9.3 kB)
Collecting pairlist>=0.2.12.4
Using cached PairList-0.2.12.4.tar.gz (10 kB)
Preparing metadata (setup.py) ... done
Collecting networkx>=2.0.dev20160901144005
Using cached networkx-3.0-py3-none-any.whl (2.0 MB)
Requirement already satisfied: numpy in c:\users\100047903\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from genice2) (1.24.2)
Collecting openpyscad
Using cached openpyscad-0.5.0-py3-none-any.whl (9.7 kB)
Collecting tilecycles>=0.1.5.6
Using cached TileCycles-0.1.5.6-py3-none-any.whl
Collecting graphstat
Using cached graphstat-0.2.1-py2.py3-none-any.whl (3.9 kB)
Collecting methodtools
Using cached methodtools-0.4.7-py3-none-any.whl
Requirement already satisfied: six<2.0.0,>=1.14.0 in c:\users\100047903\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from openpyscad->genice2) (1.16.0)
Collecting wirerope>=0.4.7
Using cached wirerope-0.4.7-py3-none-any.whl
Building wheels for collected packages: pairlist
Building wheel for pairlist (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
C:\Users\100047903\AppData\Local\Temp\pip-install-2b8vdyuj\pairlist_633079f7f84d47268f3d5d8b5cc75e0a\setup.py:4: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
from numpy.distutils.misc_util import get_numpy_include_dirs
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
copying pairlist.py -> build\lib.win-amd64-cpython-310
running build_ext
INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
building 'cpairlist' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pairlist
Running setup.py clean for pairlist
Failed to build pairlist
Installing collected packages: wirerope, pairlist, openpyscad, networkx, methodtools, graphstat, cycless, tilecycles, genice2
Running setup.py install for pairlist ... error
error: subprocess-exited-with-error
× Running setup.py install for pairlist did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
C:\Users\100047903\AppData\Local\Temp\pip-install-2b8vdyuj\pairlist_633079f7f84d47268f3d5d8b5cc75e0a\setup.py:4: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
from numpy.distutils.misc_util import get_numpy_include_dirs
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running install
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
copying pairlist.py -> build\lib.win-amd64-cpython-310
running build_ext
INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
building 'cpairlist' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> pairlist
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Currently genice2 prints two extra lines at the end of .gro outputs. For example:
genice2 --water tip4p --rep 1 1 1 1h > test.gro
the content of test.gro
is:
Generated by GenIce https://github.com/vitroid/GenIce
64
1ICE OW 1 0.127 0.183 0.337
1ICE HW1 2 0.175 0.149 0.261
1ICE HW2 3 0.175 0.149 0.413
1ICE MW 4 0.139 0.175 0.337
2ICE OW 5 0.528 0.447 0.106
2ICE HW1 6 0.570 0.481 0.185
2ICE HW2 7 0.438 0.482 0.109
2ICE MW 8 0.522 0.456 0.117
3ICE OW 9 0.659 0.539 0.331
3ICE HW1 10 0.656 0.634 0.334
3ICE HW2 11 0.613 0.510 0.410
3ICE MW 12 0.652 0.547 0.341
4ICE OW 13 0.528 0.449 0.556
4ICE HW1 14 0.438 0.484 0.560
4ICE HW2 15 0.570 0.483 0.636
4ICE MW 16 0.522 0.458 0.567
5ICE OW 17 0.256 0.091 0.563
5ICE HW1 18 0.261 -0.004 0.562
5ICE HW2 19 0.348 0.119 0.562
5ICE MW 20 0.268 0.083 0.563
6ICE OW 21 0.271 0.551 0.561
6ICE HW1 22 0.223 0.518 0.636
6ICE HW2 23 0.223 0.517 0.485
6ICE MW 24 0.259 0.542 0.561
7ICE OW 25 0.520 0.171 0.116
7ICE HW1 26 0.522 0.267 0.113
7ICE HW2 27 0.565 0.143 0.037
7ICE MW 28 0.526 0.180 0.106
8ICE OW 29 0.520 0.173 0.567
8ICE HW1 30 0.565 0.144 0.488
8ICE HW2 31 0.523 0.269 0.563
8ICE MW 32 0.526 0.182 0.556
9ICE OW 33 0.140 0.461 0.786
9ICE HW1 34 0.137 0.365 0.787
9ICE HW2 35 0.049 0.489 0.786
9ICE MW 36 0.128 0.452 0.786
10ICE OW 37 0.140 0.459 0.336
10ICE HW1 38 0.049 0.487 0.336
10ICE HW2 39 0.137 0.364 0.336
10ICE MW 40 0.128 0.451 0.336
11ICE OW 41 0.271 0.549 0.110
11ICE HW1 42 0.223 0.516 0.186
11ICE HW2 43 0.223 0.516 0.034
11ICE MW 44 0.259 0.540 0.110
12ICE OW 45 0.256 0.089 0.112
12ICE HW1 46 0.261 -0.006 0.111
12ICE HW2 47 0.348 0.118 0.112
12ICE MW 48 0.268 0.081 0.112
13ICE OW 49 0.649 0.079 0.342
13ICE HW1 50 0.738 0.114 0.339
13ICE HW2 51 0.607 0.113 0.263
13ICE MW 52 0.655 0.088 0.331
14ICE OW 53 0.649 0.081 0.792
14ICE HW1 54 0.607 0.115 0.713
14ICE HW2 55 0.738 0.116 0.789
14ICE MW 56 0.655 0.090 0.782
15ICE OW 57 0.659 0.541 0.781
15ICE HW1 58 0.655 0.636 0.785
15ICE HW2 59 0.613 0.512 0.860
15ICE MW 60 0.652 0.549 0.792
16ICE OW 61 0.127 0.185 0.787
16ICE HW1 62 0.174 0.150 0.863
16ICE HW2 63 0.175 0.151 0.712
16ICE MW 64 0.139 0.176 0.787
0.78228388 0.73535726 0.90365185
#
#Command line: c:\users\username\appdata\local\programs\python\python38\scripts\genice2 --water tip4p --rep 1 1 1 1h
The two extra lines at the end breaks some tools, such as trjconv
coming from Gromacs itself:
> gmx -quiet trjconv -f .\test.gro
Note that major changes are planned in future for trjconv, to improve usability and utility.
Will write xtc: Compressed trajectory (portable xdr format): xtc
Reading frames from gro file 'Generated by GenIce https://github.com/vitroid/GenIce ', 64 atoms.
Reading frame 0 time 0.000 Reading frames from gro file 'Generated by GenIce https://github.com/vitroid/GenIce ', 64 atoms.
Reading frame 0 time 0.000
Precision of .\test.gro is 0.001 (nm)
Using output precision of 0.001 (nm)
-> frame 0 time 0.000
-------------------------------------------------------
Program: gmx trjconv, version 2020.6-MODIFIED
Source file: src\gromacs\fileio\groio.cpp (line 67)
Fatal error:
gro file does not have the number of atoms on the second line
For more information and tips for troubleshooting, please check the GROMACS
website at http://www.gromacs.org/Documentation/Errors
-------------------------------------------------------
Deleting the two extra lines fix the issue.
Of course I can always delete them manually, but that is a bit annoying :(
Hello,
I am attempting to generate a few Ice XI configurations (out of the 16 candidates) however the only 'type' option for ferroelectric Ice XI is '11i' which only provides me with one of the sixteen candidates for Ice XI. I am wondering if there is a way for me to specify which of the 16 candidates I would like. Any help would be greatly appreciated.
Hi,
I would like to generate filled ices with the code (especially the filled ice Ih structure) and it seems to me that the filled ices (C0, C1, C2, STprime) miss the guest molecule's cages in the code.
I was wondering if the cages of the filled ices and the filled ice Ih structure could be added.
Thank you very much.
Best wishes,
Eszter
Hello, I'm trying to install genice2 in a newly created conda environment. I first installed all dependent packages via pip3, then installed genice2, but it seems that genice2 cannot run.
Please see my pip3 list:
(genice) raymond@pop-os:~$ pip3 list
Package Version
certifi 2021.5.30
cycless 0.1.4
decorator 4.4.2
GenIce2 2.1.1
graphstat 0.2.1
methodtools 0.4.3
networkx 2.5.1
numpy 1.19.3
openpyscad 0.5.0
PairList 0.2.11.1
pip 21.1.2
setuptools 52.0.0.post20210125
six 1.16.0
TileCycles 0.1.5.2
wheel 0.36.2
wirerope 0.4.3
yaplotlib 0.1.2
After I run "genice2 -h" or "genice2 --version", I got:
(genice) raymond@pop-os:~$ genice2 --version
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
File "/home/raymond/miniconda3/envs/genice/bin/genice2", line 5, in
from genice2.cli.genice import main
File "/home/raymond/miniconda3/envs/genice/lib/python3.9/site-packages/genice2/cli/genice.py", line 8, in
from genice2.genice import GenIce
File "/home/raymond/miniconda3/envs/genice/lib/python3.9/site-packages/genice2/genice.py", line 16, in
import pairlist as pl
File "/home/raymond/miniconda3/envs/genice/lib/python3.9/site-packages/pairlist.py", line 10, in
from cpairlist import pairs, pairs2
ImportError: numpy.core.multiarray failed to import
My conda list is:
(genice) raymond@pop-os:~$ conda list
# packages in environment at /home/raymond/miniconda3/envs/genice:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main
_openmp_mutex 4.5 1_gnu
ca-certificates 2021.5.25 h06a4308_1
certifi 2021.5.30 py39h06a4308_0
cycless 0.1.4 pypi_0 pypi
decorator 4.4.2 pypi_0 pypi
genice2 2.1.1 pypi_0 pypi
graphstat 0.2.1 pypi_0 pypi
ld_impl_linux-64 2.35.1 h7274673_9
libffi 3.3 he6710b0_2
libgcc-ng 9.3.0 h5101ec6_17
libgomp 9.3.0 h5101ec6_17
libstdcxx-ng 9.3.0 hd4cf53a_17
methodtools 0.4.3 pypi_0 pypi
ncurses 6.2 he6710b0_1
networkx 2.5.1 pypi_0 pypi
numpy 1.19.3 pypi_0 pypi
openpyscad 0.5.0 pypi_0 pypi
openssl 1.1.1k h27cfd23_0
pairlist 0.2.11.1 pypi_0 pypi
pip 21.1.2 py39h06a4308_0
python 3.9.5 h12debd9_4
readline 8.1 h27cfd23_0
setuptools 52.0.0 py39h06a4308_0
six 1.16.0 pypi_0 pypi
sqlite 3.35.4 hdfb4753_0
tilecycles 0.1.5.2 pypi_0 pypi
tk 8.6.10 hbc83047_0
tzdata 2021a h52ac0ba_0
wheel 0.36.2 pyhd3eb1b0_0
wirerope 0.4.3 pypi_0 pypi
xz 5.2.5 h7b6447c_0
yaplotlib 0.1.2 pypi_0 pypi
zlib 1.2.11 h7b6447c_3
Then I uninstalled the numpy1.19.3 and installed numpy 1.21.0 instead, it seems to work now.
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.