vincefn / objcryst Goto Github PK
View Code? Open in Web Editor NEWFree Objects for Crystallography : Fox / ObjCryst++
License: Other
Free Objects for Crystallography : Fox / ObjCryst++
License: Other
When a Rigid Group is added to a molecule and more then one atom is selected the XML representing the setting has multiple attributes of the name "Atom". For example:
<RigidGroup Atom="N1" Atom="N2" Atom="C2"/>
This is an invalid XML as in XML definition says that attribute names should be unique (see e.g. here Wikipedia XML Attribute).
If such configuration is added it is not possible to open or edit the XML with most XML editors or other frameworks processing XMLs.
https://i.hizliresim.com/2J92P2.jpg
First, i opened Crystal Open Database. I wrote cimetidine to words (title, crystal name) section. Then, i clicked Query Cod. Crystallography Open Database results has opened. I chose the thing that needed to do. I loaded Cimetidine Cif. Then i created New Powder Pattern. I clicked add crystalline phase in Phases section. Choose a Crystal Structure window has opened and i clicked Ok. Then, i clicked Profile Fitting + Le Bail Extraction. Profile Fitting window has opened. When i clicked on “Le Bail + Fit Profile”, “Try all possible spacegroups – Le Bail + Least Squares (SLOW)” and “Try all possible spacegroups – Le Bail only” buttons in this window, the program stopped working. So, the program is shutting down itself.
When i repeated this process, the program stopped working. So, the program is shutting down itself. The error repeated itself.
This bug causes the program to stop working and shutdown itself, it should be fixed.
Browser: Google Chrome
63.0.3239.132 (Official)
Operating system: Windows 7 professional SP1 (32 bit)
İntel Core 2 Duo 2.13 Ghz , 4 gb RAM
Program Version: F.O.X Free Objects for Crystallography 2017.2
https://i.hizliresim.com/XPXvrD.gif
<iframe width="1280" height="519" src="https://www.youtube.com/embed/kb3S7M6u44Y" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
The non-flip nature should be stored also in each MolAtom, to be able to use MolAtom::XMLOutput()
https://i.hizliresim.com/PlnWbQ.jpg
I clicked “New Monte-Carlo Object” in Objetcs Menu. I went to Global Optimization section. I clicked “Multiple Runs” in Run/Stop button.
Then, tracked data window has opened and FOX stopped working. So, the program is shutting down itself.
https://i.hizliresim.com/Z9MoXG.jpg
When i tried again, it gave the same error. This time i clicked “Single Run” and it gave the same error again. Then once more, i clicked “Least Squares Fit” and it gave the same error. If you run Global Optimization without new data entry, the program stops working and shutdowns itself. This bug causes the program to stop working and shutdown itself, it should be fixed.
Browser: Google Chrome
63.0.3239.132 (Official)
Operating system: Windows 7 professional SP1 (32 bit)
İntel Core 2 Duo 2.13 Ghz , 4 gb RAM
Program Version: F.O.X Free Objects for Crystallography 2017.2
https://media.giphy.com/media/26DNeNuoZw0RP089y/giphy.gif
<iframe width="1263" height="519" src="https://www.youtube.com/embed/uPo07uEYHiM" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
Either:
Write a message when double-clicking on structure (useful if slow connection).
Warning when number of returned hits exceeds 500.
Make the query widget non-modal ?
Probably complicated to implement: would require a pure rigid-body modelling. Alternatively, use high restraints or least squares constraints...
Check relation with MD ?
Compilation of Fox (2017.2 or git cloned) on Arch Linux fails due to two (or three if using shared libs) compiler errors. I am using gcc version 8.1.0.
The first one is about using deleted function in boost::shared_ptr.
wxCrystal.cpp: In member function ‘void ObjCryst::WXGLCrystalCanvas::OnUpdateUI(wxUpdateUIEvent&)’: wxCrystal.cpp:3996:126: error: use of deleted function ‘boost::shared_ptr<ObjCryst::UnitCellMap>::shared_ptr(const boost::shared_ptr<ObjCryst::UnitCellMap>&)’ boost::shared_ptr<ObjCryst::UnitCellMap> pMap=mvpUnitCellMap[mpFourierMapListWin->mpAvailableMapList->GetSelection()]; ^ In file included from /home/chloris/tmp/Fox/ObjCryst/wxCryst/../../static-libs/include/boost/shared_ptr.hpp:17, from /home/chloris/tmp/Fox/ObjCryst/wxCryst/../../ObjCryst/../ObjCryst/wxCryst/wxCrystal.h:30, from wxCrystal.cpp:35: /home/chloris/tmp/Fox/ObjCryst/wxCryst/../../static-libs/include/boost/smart_ptr/shared_ptr.hpp:158:25: note: ‘boost::shared_ptr<ObjCryst::UnitCellMap>::shared_ptr(const boost::shared_ptr<ObjCryst::UnitCellMap>&)’ is implicitly declared as deleted because ‘boost::shared_ptr<ObjCryst::UnitCellMap>’ declares a move constructor or move assignment operator template<class T> class shared_ptr ^~~~~~~~~~ wxCrystal.cpp: In member function ‘void ObjCryst::WXGLCrystalCanvas::OnFourier(wxCommandEvent&)’: wxCrystal.cpp:4279:126: error: use of deleted function ‘boost::shared_ptr<ObjCryst::UnitCellMap>::shared_ptr(const boost::shared_ptr<ObjCryst::UnitCellMap>&)’ boost::shared_ptr<ObjCryst::UnitCellMap> pMap=mvpUnitCellMap[mpFourierMapListWin->mpAvailableMapList->GetSelection()]; ^ wxCrystal.cpp:4290:128: error: use of deleted function ‘boost::shared_ptr<ObjCryst::UnitCellMapGLList>::shared_ptr(const boost::shared_ptr<ObjCryst::UnitCellMapGLList>&)’ boost::shared_ptr<UnitCellMapGLList> pMap=mvpUnitCellMapGLList[mpFourierMapListWin->mpDisplayedMapList->GetSelection()]; ^ In file included from /home/chloris/tmp/Fox/ObjCryst/wxCryst/../../static-libs/include/boost/shared_ptr.hpp:17, from /home/chloris/tmp/Fox/ObjCryst/wxCryst/../../ObjCryst/../ObjCryst/wxCryst/wxCrystal.h:30, from wxCrystal.cpp:35: /home/chloris/tmp/Fox/ObjCryst/wxCryst/../../static-libs/include/boost/smart_ptr/shared_ptr.hpp:158:25: note: ‘boost::shared_ptr<ObjCryst::UnitCellMapGLList>::shared_ptr(const boost::shared_ptr<ObjCryst::UnitCellMapGLList>&)’ is implicitly declared as deleted because ‘boost::shared_ptr<ObjCryst::UnitCellMapGLList>’ declares a move constructor or move assignment operator template<class T> class shared_ptr ^~~~~~~~~~ wxCrystal.cpp:4302:126: error: use of deleted function ‘boost::shared_ptr<ObjCryst::UnitCellMap>::shared_ptr(const boost::shared_ptr<ObjCryst::UnitCellMap>&)’ boost::shared_ptr<ObjCryst::UnitCellMap> pMap=mvpUnitCellMap[mpFourierMapListWin->mpAvailableMapList->GetSelection()]; ^ make[2]: *** [gnu.mak:26: wxCrystal.o] Error 1 make[2]: Leaving directory '/home/chloris/tmp/Fox/ObjCryst/wxCryst' make[1]: *** [/home/chloris/tmp/Fox/Fox/src/../../ObjCryst/rules.mak:299: libwxCryst] Error 2 make[1]: Leaving directory '/home/chloris/tmp/Fox/Fox/src' make: *** [Makefile:16: Fox] Error 2
Possible solution (that works) is proposed here. I fixed it by adding shared_ptr(const shared_ptr&) = default;
in file static-libs/include/boost/smart_ptr/shared_ptr.hpp
under public:
in class template<class T> class shared_ptr
. Though upgrading the bundled Boost might be a better option.
The second one is about convertion of false
to void*
.
FoxServerThread.cpp: In member function ‘virtual void* FoxServerThread::Entry(): FoxServerThread.cpp:73:18: error: cannot convert ‘bool’ to ‘void*’ in return return false; ^~~~~ make[2]: *** [gnu.mak:25: FoxServerThread.o] Error 1 make[2]: Leaving directory '/home/chloris/tmp/Fox/Fox/src' make[1]: *** [gnu.mak:37: Fox] Error 2 make[1]: Leaving directory '/home/chloris/tmp/Fox/Fox/src' make: *** [Makefile:16: Fox] Error 2
I solved it by replacing return false;
with return (void*)false;
in line number 73 of file Fox/src/FoxServerThread.cpp
. Though this is a dirty trick and it would probably be best not to use void* altogether.
The third one I only encountered when using shared wxgtk, freeglut and fftw, is about missing library.
g++ -L/usr/lib -L/usr/local/lib -L/home/chloris/tmp/Fox/Fox/src/../../ObjCryst/CrystVector -L/home/chloris/tmp/Fox/Fox/src/../../ObjCryst/ObjCryst -L/home/chloris/tmp/Fox/Fox/src/../../ObjCryst/RefinableObj -L/home/chloris/tmp/Fox/Fox/src/../../static-libs/lib -L/home/chloris/tmp/Fox/Fox/src/../../ObjCryst/Quirks -L/home/chloris/tmp/Fox/Fox/src/../../ObjCryst/wxCryst -L/x86_64/lib -o Fox Fox.o FoxJob.o GridResult.o IOSocket.o FoxServerThread.o FoxServer.o FoxClient.o WXFoxClient.o WXFoxServer.o WXGridWindow.o -lm -lcryst -lCrystVector -lQuirks -lRefinableObj -lcctbx /home/chloris/tmp/Fox/Fox/src/../../static-libs/lib/libnewmat.a -L/usr/X11R6/lib -lwxcryst wx-config --unicode=yes --libs adv,core,base,net wx-config --unicode=yes --gl-libs -lGL -lGLU -lglut -lfftw3f /home/chloris/tmp/Fox/Fox/src/../../static-libs/lib/libmysqlclient.a /usr/bin/ld: /home/chloris/tmp/Fox/Fox/src/../../static-libs/lib/libmysqlclient.a(client_plugin.c.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5' /usr/lib/libdl.so.2: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[1]: *** [gnu.mak:38: Fox] Error 1 make[1]: Leaving directory '/home/chloris/tmp/Fox/Fox/src' make: *** [Makefile:16: Fox] Error 2
I solved it by adding -ldl
in front of ...static-libs/lib/libmysqlclient.a
of the last g++ command.
Follow instructions here (Get Latest Fox from git repository (RECOMMENDED)). I used make
(with Fox 2017.2) to produce the first two issues and make shared-wxgtk=1 shared-glut=1 shared-fftw=1
(with git-cloned Fox) to produce all three of them.
When running Fox compiled using shared libraries, I got message
09:38:30: Warning: Mismatch between the program and library build versions detected. The library used 3.0 (wchar_t,compiler with C++ ABI 1011,wx containers,compatible with 2.8), and your program used 3.0 (wchar_t,compiler with C++ ABI 1012,wx containers,compatible with 2.8).
I did not get such messages when I compiled Fox with static libraries.
Try Na2Ca3Al2F14 data. Diverging (background) and crash..
Add Fundamental parameters approach for reflection profiles.
Would be a lot of work, probably long computation times.
Relevant litterature/code:
From JG:
In the past FOX program, the unit cell plane did not randomly cut off molecules, why does the new FOX program cut molecules?
In the past version of Fox, even if the display limit is adjusted, the geometry that is packed inside the unit cell is clearly visible because it disappears or appears in molecular units.
So, not sure if this is an actual issue, but the mailing list over on sourceforge seems inactive, so I am writing here.
I am trying to use FOX to calculate X-ray diffraction patterns for models of amorphous solids (from molecular simulation). This is on microscopic models of amorphous phases, so what I am doing is:
Fox-nogui --cif2pattern
to calculate each patternThe system I am working with currently has ~2000 atoms, with units cells of ~35 Å in size. Each FOX calculation takes about 2 minutes, so the complete process is quite slow.
What I am wondering is: how much of that time is due to the actual calculation, and how much is due to the set up and could probably be eliminated if I could run a single FOX calculation with all my inputs. Is that possible? Any advice would be welcome.
Start profile fitting/manual mode, without checking any parameter to refine => crash
Occurred once when testing LiB2O7 data, with quick search including centered lattices
Hello,
I've encountered issues when trying to perform a LeBail profile fit on a powder pattern with multiple phases. This problem does not occur when working with single phase patterns. I have fairly good lattice constants from both phases (it is a mix from two pure phases I deliberately made to try multi phase refinement), so the starting parameters should be ok.
For these particular phases, Fox profile fitting works very well when dealing with phase-pure samples; however in the mixed powder pattern I am unable to get a decent profile fit - it diverges from the start. I have verified in fullprof that this pattern that a good profile fit can be easily obtained for this pattern.
I add the input file (as .txt) as an attachment.
Thanks in advance!
gis-ana.txt
TOF neutron data (ISIS, three columns) cannot be imported. Please provide an advise on how to sort this out. The problem exist both on windows and mac.
In some cases, the wavelength is not correctly read during FindPeaks.
To be tested:
Cannot reproduce in MacOs. Must test under windows.
I think one of the most important parts of SDPD for organic molecules is to set up restraints appropriate to the shape of the molecule.
In particular, by setting information about a well-known torsion angle in the form of a restraint, the system can be prevented from staying in the local minima.
However, there may be many torsional angles preferred by some structural motifs.
This information can also be easily obtained based on the CCDC database.
However, the restaint for the dihedral angle currently used in F.O.X. can be set only for a single range.
If the restraint range can be set to more than one, and the dichotomy can be made to effectively determine the angle of the two ranges in the global optimization process, the FOX program is likely to get better.
Hi,
thanks a lot for picking up the work of this awesome project again!
I would like to help a bit, so here are little bugs I found and my thoughts about new functions in FOX:
Maximize/minimize buttons for 3D crystal view window and PXRD graph view window are missing.
Tube alpha1/alpha2 value is not saved, when saving project (should be <XRayTubeAlpha2Alpha1Ratio>#value#</XRayTubeAlpha2Alpha1Ratio>
in Radiation section, loading works fine, if manually written to save-file)
When choosing CuKa1 as radiation, the alpha1/alpha2 value should be set to 0 automatically
Decimal points are displayed with the default setting of Windows ("." or ",") in FOX 2016. In older versions it was always "." Adding an option for this in Preferences would be really helpful.
"Reset peaks" in right-click menu in show graph window would be helpful, which will reset the "find peaks" operation and the manually added peaks.
Spurious lines in quick indexing should be a selectable amount (0-3), because it can take hours to do 3 spurious lines - and especially with manually selected peaks it is not necessary to have 3.
A button to export (and maybe import?) the results of indexing would be a nice thing.
The used OS is Windows.
https://i.hizliresim.com/YgNjBZ.jpg
I realised the error like this:
First, i opened crystal open database. I wrote cimetidine to words (title, crystal name) section. Then, i clicked Query Cod. Crystallography Open Database results has opened. I chose the thing that needed to do. I loaded Cimetidine Cif. Then, i clicked New Single Crystal Diffraction on Objects menu. I chose “Sum according to user data” on Group Reflections section. I clicked “Simulation Mode (Generate HKL List)” on File menu. “Enter maximum Theta” window has opened. I cilcked ok. Then i clicked ok again on choose method window. When i repeated this process, the program stopped working. So, the program is shutting down itself.
This time, i decided to try a different way. I created a New Crystal. Then i created Single Crystal Diffraction. I chose “Sum according to user data” on Group Reflections section. I clicked “Simulation Mode (Generate HKL List)” on File menu. When i repeated this process, the program stopped working. So, the program is shutting down itself. The error repeated itself.
This bug causes the program to stop working and shutdown itself, it should be fixed.
Browser: Google Chrome
63.0.3239.132 (Official)
Operating system: Windows 7 professional SP1 (32 bit)
İntel Core 2 Duo 2.13 Ghz , 4 gb RAM
Program Version: F.O.X Free Objects for Crystallography 2017.2
https://i.hizliresim.com/G90E8Z.gif
<iframe width="1263" height="480" src="https://www.youtube.com/embed/s_jKkgkEQE8" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
Hi,
I have a request for a new feature, I hope it is possible to realize. I'm sorry, the whole thing is a bit hard to describe. Please let me know if something is unclear.
I am thinking of a new function, which is just the opposite of the anti-bump. With anti-bump, the cost goes up, if 2 atoms come too close to each other.
When someone is trying to solve a structure of a metal-organic framework (for example), it is often known that the carboxylate-oxygen is coordinating to the metal. The metal position is often easy to find with FOX, but getting the linker (an organic rigid body) in the right position, is not possible in most cases.
If FOX could put a cost factor for solutions, where certain atom types are too far away from each other, it should help a lot finding the right solution. The possibility to assign different oxygen-atoms to other types with any name is already there.
Best wishes!
ChangeLog.txt seems to indicate there was a 2022.1 release, but I can't find this release on the Releases page or Tags page. Was this a real release and if so, could you tag/release it please? Thanks.
Sometimes addition of non-flip atom does not work ?
Possible crash after adding non-flip atom, and launching optimization ? (xGrid crash)
Input box for Fourier map levels do not use a localised validator.
Same when creating a new polyhedra
Fox can crash under some conditions when:
In some cases, when a Scatterer is removed from a Crystal, the program will crash when starting a new calculation or optimisation.
... instead of forcing the C locale, resulting in incorrect z-matrix files (Fenske-Hall and named z-matrices)
https://i.hizliresim.com/Z9kLb0.jpg
I opened K-tartrate.xml file. I did “convert atoms to a molecule” in scatterers section. I chose K atom in “choose the molecule’s atoms” window. I clicked Formula & Restraints button in Molecule section. Then, i chose Debug Test. The program stopped working. I checked the error again. This time i created new crystal in objects menu. I chose “add atomic scattering power” in scatterers section. Afterwards, i clicked to add atom. “Choose an atom type (scattering power)” window has opened. I chose scattering power atom in this window. Then i did “convert atoms to a molecule” in scatterers section. I clicked on Formula & Restraints button in the opening section. I chose Debug Test in this section. The program stopped working again. When i did the debug test, the program gives error. This error should be fixed.
Browser: Google Chrome
63.0.3239.132 (Official)
Operating system: Windows 7 professional SP1 (32 bit)
İntel Core 2 Duo 2.13 Ghz , 4 gb RAM
Program Version: F.O.X Free Objects for Crystallography 2017.2
<iframe width="854" height="480" src="https://www.youtube.com/embed/1QeNF_DXstc" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<iframe width="854" height="480" src="https://www.youtube.com/embed/I6inOR-iCSs" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
Hello,
I have recently discovered a serious bug and would like to report it.
I am a user using the Korean version of Windows7 64 bit.
When I tried to do grid computing in the FOX program, I noticed that the local client execution button did not work on the server screen.
Also, after executing another FOX program and running the client, connecting to the local server did not normally execute the job.
CPU utilization has not been increased.
Example: Li2B4O7 using the automatically found max(sin(theta)/lambda)
There is a compilation error with recent mysql (e.g. ubuntu 20.04, debian bullseye):
g++ -O3 -w -ffast-math -fstrict-aliasing -pipe -fomit-frame-pointer -funroll-loops -ftree-vectorize -DHAVE_SSE_MATHFUN -DUSE_SSE2 -march=native -D__FOX_COD__ -I/usr/include/mysql -I/include -I/home/esrf/favre/dev/Fox-2017-06-28/Fox/src/../../ObjCryst/.. -I/home/esrf/favre/dev/Fox-2017-06-28/Fox/src/../../static-libs/include -DOBJCRYST_GL -I/usr/X11R6/include -IGL -DHAVE_GLUT -D__WX__CRYST__ `/home/esrf/favre/dev/Fox-2017-06-28/Fox/src/../../ObjCryst/../static-libs/bin/wx-config --unicode=yes --cxxflags` -DHAVE_FFTW -DREAL=float -c Fox.cpp -o Fox.o
In file included from Fox.cpp:70:
/usr/include/mysql/mysql.h:470:6: error: use of enum ‘net_async_status’ without previous declaration
470 | enum net_async_status STDCALL mysql_real_connect_nonblocking(
| ^~~~~~~~~~~~~~~~
/usr/include/mysql/mysql.h:474:6: error: use of enum ‘net_async_status’ without previous declaration
474 | enum net_async_status STDCALL mysql_send_query_nonblocking(
| ^~~~~~~~~~~~~~~~
/usr/include/mysql/mysql.h:476:6: error: use of enum ‘net_async_status’ without previous declaration
476 | enum net_async_status STDCALL mysql_real_query_nonblocking(
| ^~~~~~~~~~~~~~~~
in ObjCryst/rules-gnu.mak
there is the line
$(BUILD_DIR)/boost_1_68_0.tar.bz2:
cd $(BUILD_DIR) && $(DOWNLOAD_COMMAND) https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.bz2
however that URL is no longer available. Is that particular version of boost required? Currently
boost.org points to
http://boostorg.jfrog.io/artifactory/main/release/1.68.0/source/boost_1_68_0.tar.bz2
Add an Undo feature in Fox GUI.
This could be implemented by saving regularly all objects in XML form and keeping them in memory.
This could exploit WXValidateAllUserInput() as a point where the XML configuration is systematically saved (if there was any change).
Notes:
Instead of saving a single XML file, it would be more flexible to save a list of XML for each top-level object, so that each one can be reloaded individually, after checking the changes with the current configuration.
When going back to a state with some deleted objects, the order to reload/delete objects must be checked. For example start from a state with a powder data and two phases cryst1 and cryst2, and go back to a state with only cryst1. The new cryst1 must first be reloaded (if there was any change), then the powder data, and only then cryst2 can be deleted. Generally the order to reload configuration should be Crystal, DiffractionDataSingleCrystal, PowderPattern, OptimizationObj, and the order to delete objects should be the inverse
Each 'saved' state could include 1) a timestamp and 2) a list of 4 list of objects' XML description:
For each type of object, keep a list of objects configuration as a pair <original pointer, XML string>, where the 'XML string' actually is a shared_ptr towards the real XML string. Using a shared_ptr allows to avoid copies of objects which are un-modified, e.g. when the Crystal structure is modified while the diffraction data is not.
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.