Code Monkey home page Code Monkey logo

objcryst's People

Contributors

briantoby avatar cfarrow avatar janrohlicek avatar pavoljuhas avatar swt2c avatar vincefn avatar zdemat avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

objcryst's Issues

Rigid Group with multiple atoms leads to an invalid XML

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.

Bug: Free Objects for Crystallography - If you doing Profile Fitting when you loaded Cimetidine Crystal, the program stops working and shutdowns itself

https://i.hizliresim.com/2J92P2.jpg

Expected behavior

Doing Profile Fitting When I Loaded Cimetidine Crystal

  ####

Actual behavior

The program does not respond and then FOX-2017-06-28.exe stops working

How to reproduce

   
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

Recording Of The Bug

  • Profile – Profile Fitting + Le Bail Exraction – Le Bail + Fit Profile Gif’s:

https://i.hizliresim.com/XPXvrD.gif

  • You can see the error in the video in detail below:

<iframe width="1280" height="519" src="https://www.youtube.com/embed/kb3S7M6u44Y" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>



Posted on Utopian.io - Rewarding Open Source Contributors

Bug : Free Objects for Crystallography FOX - If you run Global Optimization without new data entry, the program stops working and shutdowns itself.

https://i.hizliresim.com/PlnWbQ.jpg

Expected behavior

Doing Run/Stop in Global Optimization

  ####

Actual behavior

The program does not respond and then FOX-2017-06-28.exe stops working

How to reproduce

   I clicked “New Monte-Carlo Object” in Objetcs Menu. I went to Global Optimization section. I clicked “Multiple Runs” in Run/Stop button.

https://i.hizliresim.com/p6XJn0.jpg

   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

Recording Of The Bug

  • Global Optimiation – Run/Stop – Multiple Runs Gif’s:

https://media.giphy.com/media/26DNeNuoZw0RP089y/giphy.gif

  • You can see the error in the video in detail below:

<iframe width="1263" height="519" src="https://www.youtube.com/embed/uPo07uEYHiM" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>



Posted on Utopian.io - Rewarding Open Source Contributors

COD: Increase verbosity, not modal widget

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 ?

Limit changes of restraint parameters not possible

In past FOX programs, if you want to change the limits in the program, you can change it by right clicking on the restraints name.
594b78523fd996338d8a38b8

However, in the new FOX program, there is no response when you right-click the mouse.
As with all restraints, it does nothing. I wonder if you can solve this problem.

Compilation issues on Arch Linux

The Issue

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.

Error Messages

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.

How to Reproduce

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.

Additional Notes

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.

Reflection profiles: Fundamental parameters approach

Add Fundamental parameters approach for reflection profiles.
Would be a lot of work, probably long computation times.
Relevant litterature/code:

3D display of whole Molecules

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.

Obtaining a PXRD pattern for multiple structures with --cif2pattern

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:

  • take several configurations of the system, sampled with MD at a given temperature
  • convert each to a CIF file
  • use Fox-nogui --cif2pattern to calculate each pattern
  • average all the patterns

The 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.

LeBail fit divergence when profile fitting 2 crystal phases

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

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.

PowderPattern: update wavelength for FindPeaks

In some cases, the wavelength is not correctly read during FindPeaks.
To be tested:

  1. open powder pattern graph
  2. change wavelength
  3. search peaks
    if Powder pattern update is not updated, then the correct wavelength is not taken into account, despite WXCrystValidateAllUserInput()

Cannot reproduce in MacOs. Must test under windows.

Suggestions on how to develop restraints on torsion angle.

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.

Some issues

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:

  1. Maximize/minimize buttons for 3D crystal view window and PXRD graph view window are missing.

  2. 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)

  3. When choosing CuKa1 as radiation, the alpha1/alpha2 value should be set to 0 automatically

  4. 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.

  5. "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.

  6. 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.

  7. A button to export (and maybe import?) the results of indexing would be a nice thing.

The used OS is Windows.

Bug: Free Objects for Crystallography - If you run Simulation Mode twice, the program stops working and shutdowns itself

https://i.hizliresim.com/YgNjBZ.jpg

Expected behavior

Doing Simulation Mode (Generate HKL List) twice in Single Crystal Diffraction

Actual behavior

The program does not respond and then FOX-2017-06-28.exe stops working

How to reproduce

   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

Recording Of The Bug

  • Single Crystal Diffraction – File – Simulation Mode (Generate HKL List) Gif’s:

https://i.hizliresim.com/G90E8Z.gif

  • You can see the error in the video in detail below:

<iframe width="1263" height="480" src="https://www.youtube.com/embed/s_jKkgkEQE8" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>



Posted on Utopian.io - Rewarding Open Source Contributors

Request for a new feature

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!

2022.1 Release?

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.

Crash with indexing when a solution is selected and auto-Le Bail is set

Fox can crash under some conditions when:

  • with the indexing window
  • when a solution is selected
  • when a crystal to apply the solution to is chosen (already or not ?) Apparently when the crystal is created first, and not automatically by the Le Bail window.
  • and (?) is automatic Le Bail is set ?

Bug Hunting: Free Objects for Crystallography "FOX-2017-06-28.exe stopped working" error during Debug Test !

https://i.hizliresim.com/Z9kLb0.jpg

Expected behavior

Doing “Debug Test”

  ####

Actual behavior

FOX-2017-06-28.exe stopped working

  ####

How to reproduce

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

Recording Of The Bug

  • Formula & Restraints –Debug Test Gif’s:
https://i.hizliresim.com/m26rV4.gif

  • You can see the error in the first video in detail below:

<iframe width="854" height="480" src="https://www.youtube.com/embed/1QeNF_DXstc" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

  • You can see the error again in the second video in detail below:

<iframe width="854" height="480" src="https://www.youtube.com/embed/I6inOR-iCSs" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

“The Debug Test” feature are ending up with shutdown of the program in the situations above   The FOX program is not responding.   This error should be fixed !



Posted on Utopian.io - Rewarding Open Source Contributors

Bug report / Grid Calculation

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.

compilation error with mysql

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(
      |      ^~~~~~~~~~~~~~~~

location of boost_1_68_0

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

Undo feature

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:

  • undoing would close and re-open all windows
  • it should be possible to save/reload the XML specifically for some objects... But it would be necessary to keep track of the objects in memory with their different relationships. Tricky
  • need to take care of some sub-windows (indexing, profile fitting) which may be invalidated
  • some display options (Fourier maps, display ranges for the Crystal structures) would not be saved

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:

  1. Crystal
  2. Single Crystal diffraction data
  3. Powder data
  4. Optimisation obj

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.

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.