Git Product home page Git Product logo

condor's People

Contributors

augustwollter avatar daurer avatar ekeberg avatar filipemaia avatar kartikayyer avatar max-refeyn avatar mhantke avatar toonggg avatar

Stargazers

 avatar  avatar  avatar  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  avatar  avatar  avatar

condor's Issues

custom_map example does not work

When I try the example condor/examples/scripts/custom_map/example.py I get:

$ python example.py
Simulating map
WARNING:    File ./condor.cxi exists and is being overwritten
Traceback (most recent call last):
  File "example.py", line 39, in <module>
    res = E.propagate()
  File "/Library/Python/2.7/site-packages/condor/utils/log.py", line 60, in st_func
    r = func(*args, **keyArgs)
  File "/Library/Python/2.7/site-packages/condor/experiment.py", line 168, in propagate
    D_particles = self._get_next_particles()
  File "/Library/Python/2.7/site-packages/condor/experiment.py", line 152, in _get_next_particles
    D_particles["particle_%02i" % i] = p.get_next()
  File "/Library/Python/2.7/site-packages/condor/particle/particle_map.py", line 204, in get_next
    O = AbstractContinuousParticle.get_next(self)
  File "/Library/Python/2.7/site-packages/condor/particle/particle_abstract.py", line 266, in get_next
    O = AbstractParticle.get_next(self)
  File "/Library/Python/2.7/site-packages/condor/particle/particle_abstract.py", line 97, in get_next
    O["extrinsic_quaternion"] = self._get_next_extrinsic_rotation().get_as_quaternion()
  File "/Library/Python/2.7/site-packages/condor/particle/particle_abstract.py", line 152, in _get_next_extrinsic_rotation
    rotation = self._rotations.get_next_rotation()
  File "/Library/Python/2.7/site-packages/condor/utils/rotation.py", line 340, in get_next_rotation
    self._rotations[0]._set_as_random_formalism(self._formalism)
  File "/Library/Python/2.7/site-packages/condor/utils/rotation.py", line 146, in _set_as_random_formalism
    self.set_as_random()
  File "/Library/Python/2.7/site-packages/condor/utils/rotation.py", line 158, in set_as_random
    q = rand_quat()

Looks like rand_quat() is not defined anywhere.

Cube size

The speckle size when I simulate a ball is half the size of a cube of the same diameter. I suspect the code for the cube is buggy...

Problems running spsim

Alberto was trying to run a simulation with spsim and the following thing showed up problem in the slurm.out:

INFO:simulate:Simulation with spsim started. (PROGSTAT)
/home/www/condor/local/bin/spsim: error while loading shared libraries: libcudart.so.6.5: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/home/www/condor/diffractor/diffractor/simulate.py", line 119, in
conf = read_configuration_spsim("./spsim.confout")
File "/home/www/condor/diffractor/diffractor/simulate.py", line 19, in read_configuration_spsim
c = open(filename,"r")
IOError: [Errno 2] No such file or directory: './spsim.confout'

Looks like it couldn't find the CUDA libraries. Is the LD_LIBRARY_PATH correctly set?

Is Python 3.9 supported?

Been following installation guides and get
AttributeError: module 'condor' has no attribute 'main'
when running examples.py

I'm suspecting this may be due to missing Python 3.9 support?

Example PDB file does not match with spsim parsing of atomic number

Since the spsim commit FXIhub/spsim@fc920d8#diff-573b39bd8d69627dd0431d425785abd0L200 columns 77-78 are parsed when searching for the atomic number in the PDB file. These columns don't exist in the example file DNA.pdb which causes the examples to be erratic.

A quick fix could be to use a complete PDB file instead. Even better would be to make spsim parse the atomic number in both cases (with and without the element columns 77-78), see FXIhub/spsim#8

Issue in condor/utils/resample.py

Line 92 to Line 93:
TypeError: No loop matching the specified signature and casting was found for ufunc true_divide
The problem is that we can't divided using /= on an Numpy-array.
The proposed fix is to replace the division by //=:
Y //= factor
X //= factor

online use of condor

I am a graduate student from China. I think condor is a very excellent scientific research tool. However, the online web version of condor is very unstable. It often cannot be opened or errors occur. I don't know if it's a problem with my network or a problem with the condor server.

Condor segfaults on input

The following configuration causes condor to segfault:

# Configuration file
# Automatically written by Configuration instance

[sample]
geometry=icosahedron
diameter=6.3e-08
number_of_orientations=1
material_type=protein
alignment=random

[source]
focus_diameter=1e-06
wavelength=2.06640320889e-10
pulse_energy=0.0096

[detector]
distance=0.1
noise=none
binning=1
nx=500
ny=500
output_phases=False
pixel_size=0.00022

Can not import nfft module

Tried to run example.py after installing condor as per documentation. Encountered

---------------------------------------------------------------------------------------------------

>>> Example 1/17: PARTICLE IDEAL SPHERE (configfile)
cd /var/home/keshav/phd/beamline/condor_simulations/condor/examples/configfile/particle_sphere; rm -f condor.cxi; condor
[start output]
Traceback (most recent call last):
  File "/usr/local/bin/condor", line 33, in <module>
    sys.exit(load_entry_point('condor==1.0.7', 'console_scripts', 'condor')())
  File "/usr/local/bin/condor", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib64/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/local/lib64/python3.9/site-packages/condor/__init__.py", line 33, in <module>
    from .experiment import Experiment
  File "/usr/local/lib64/python3.9/site-packages/condor/experiment.py", line 53, in <module>
    import condor.utils.nfft
ImportError: libnfft3.so.1: cannot open shared object file: No such file or directory
[end output]
Traceback (most recent call last):
  File "/var/home/keshav/phd/beamline/condor_simulations/condor/examples.py", line 147, in <module>
    run_examples()
  File "/var/home/keshav/phd/beamline/condor_simulations/condor/examples.py", line 133, in run_examples
    raise Exception(">>> Example %i (%s) failed. Abort." % (i+1,e["name"]))
Exception: >>> Example 1 (PARTICLE IDEAL SPHERE (configfile)) failed. Abort.

It failed to open libnfft3.so.1, but NFFT is installed at /usr/local/lib/libnfft3.so.1.

$ locate libnfft
/usr/local/lib/libnfft3.a
/usr/local/lib/libnfft3.la
/usr/local/lib/libnfft3.so
/usr/local/lib/libnfft3.so.1
/usr/local/lib/libnfft3.so.1.0.0

Something wrong with the gold

When I use the web page to run a simulation of a 50 nm gold ball at 6 keV I get 0 photons. If I change the material to water I get 5000 photons. Something is fishy...

Difference in signal for the same molecule using particleAtoms (with PDB-file) and ParticleMap (with meshgrid) at q=0

Hi,

Comparing the resulting signal from the same molecule using two different methods, particleAtoms and particleMap, I do not get the same value for q=0 (If I don't scale with a factor). The input for particleAtoms is a PDB-file. Using the same PDB-file, I have with DFT calculated the electron density on a grid, and made it an input to Condor. All files to run on the cluster is attached.

PDB_vs_DENCHAR.zip

pip version of condor does not run on python 2

In [1]: import condor File "/Users/filipe/Library/Python/2.7/lib/python/site-packages/condor/task.py", line 55 def __init__(self, name : str, wdir : str, args : dict, using_pipe : bool = False): ^ SyntaxError: invalid syntax

run on windows

Can I use condor on windows system?I tried but failed.

Misspelled variable name

There is a misspelled variable name in condor/particle/particle_sphere.py
On line 103 an L is missing:
def get_conf(sef):
rather than
def get_conf(self):

can not import spism module

I have installed the condor successfully according to the docs. But when I python example.py, the error occurs.

>>> Example 4/17: PARTICLE ATOMS (configfile)
cd /home/yxli/air/condor/examples/configfile/particle_atoms; rm -f condor.cxi; condor
[start output]
dynamic module does not define module export function (PyInit__spsim_pybackend)
ERROR:	Cannot import spsim module. This module is necessary to simulate diffraction for particle model of discrete atoms. Please install spsim from https://github.com/FilipeMaia/spsim and try again.
Traceback (most recent call last):
  File "/home/linuxbrew/.linuxbrew/opt/python/lib/python3.7/site-packages/spsim_pybackend.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
  File "/home/linuxbrew/.linuxbrew/opt/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 670, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 583, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1043, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: dynamic module does not define module export function (PyInit__spsim_pybackend)

I tried to reinstall the spsim, but it still did not work. Spsim module can not be imported, and I don not know how to deal with it.

qmap_cache not populated when simulating from atoms

Under condor/examples/scripts/diffraction_3d/example.py, this code works flawlessly in plotting the real space object when using condor.ParticleMap for a sphere or icosahedron, but when I use condor.ParticleAtoms in order to use a PDB, I get the following error:

RuntimeError: Cache empty!

This occurs on line 22:

qmap

E.get_qmap_from_cache()

Syntax change with NFFT 3.3

Since NFFT 3.3, the keyword argument nfft_flags of the fft_plan module has been renamed to flags. This creates a problem in the following file

// As of NFFT 3.3, "nfft_flags" has been renamed to "flags"
if (my_plan.nfft_flags &PRE_PSI) {
nfft_precompute_one_psi(&my_plan);
}

I tried to fix this by checking for the NFFT version, but I didn't find any working solution so far...

Typo in particle_map.py?

On lines 324 and 351 in particle_map.py, there is a call to perproc_map_manual
Should that be preproc_map_manual ? Looks like it should offset a map and multiply by a factor, but I don't know if it's even used.

Codec error when trying to create conda package

When trying to create a conda package I get the following error:

Traceback (most recent call last):
  File "pickle_tables.py", line 107, in <module>
    pickle_atomic_standard_weights_and_numbers(here + "/sw", here)
  File "pickle_tables.py", line 63, in pickle_atomic_standard_weights_and_numbers
    lines = f.readlines()
  File "/Users/filipe/miniconda3/conda-bld/condor_1527942418754/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 156: ordinal not in range(128)

I think using codes.open() instead of simply open() before the readlines() will probably fix it.

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.