Skip to content

Commit ce29873

Browse files
authored
Merge branch 'devel' into olz_volume_consensus
2 parents 742d7a8 + 3fa0b84 commit ce29873

File tree

10 files changed

+366
-202
lines changed

10 files changed

+366
-202
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ${{ matrix.os }}
3030

3131
env:
32-
SEND_INSTALLATION_STATISTICS: "False"
32+
SEND_INSTALLATION_STATISTICS: OFF
3333
steps:
3434
- name: Install dependencies
3535
run: |

README.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,39 @@ This is the main repository, which contains the majority of the source code for
1515
To have a complete overview about Xmipp please visit the [documentation web](https://i2pc.github.io/docs/). The recommended way for users (not developers) to install and use Xmipp is via the [Scipion](http://scipion.i2pc.es/) framework, where you can use Xmipp with other Cryo-EM-related software.
1616

1717
### As a Scipion plugin (Recommended)
18-
The Scipion installer should take care of all dependencies for you by default, except for CUDA. To correctly interoperate with CUDA, please visit the official [installation guide](https://scipion-em.github.io/docs/release-3.0.0/docs/scipion-modes/how-to-install.html#installation) of Scipion.
18+
19+
Mind that for this command to succeed, all dependencies need to be pre-installed and findable by Xmipp. When using non-standard install directories, this needs to be indicated to Xmipp though the Scipion configuration file. See [Software dependency section](https://github.com/I2PC/xmipp?tab=readme-ov-file#software-dependencies) for further details.
20+
To correctly interoperate with CUDA, please visit the official [installation guide](https://scipion-em.github.io/docs/release-3.0.0/docs/scipion-modes/how-to-install.html#installation) of Scipion.
1921

2022
Once Scipion is in working order, launch the Xmipp Plugin installer with
2123

2224
`scipion3 installp -p scipion-em-xmipp`
2325

2426
By default this will employ all CPU cores available in the system for compilation. If this is not the desired behavior, please consider using `-j <N>` flag to limit the amount of CPU cores.
2527

26-
### As a Scipion plugin with pre-installed dependencies
27-
The former method also installs dependencies (including the compiler) though conda. If you prefer to use externally installed dependencies and avoid downloading them from conda use
28-
29-
`scipion3 installp -p scipion-em-xmipp --noBin`
30-
31-
`scipion3 installb xmippSrc`
32-
33-
Mind that for this command to succeed, all dependencies need to be pre-installed and findable by Xmipp. When using non-standard install directories, this needs to be indicated to Xmipp though the Scipion configuration file. See [Software dependency section](https://github.com/I2PC/xmipp?tab=readme-ov-file#software-dependencies) for further details.
34-
3528
### Developer installation with Scipion
36-
For developers, it becomes handy to install Xmipp in an external directory for easy integration with IDEs. By default Xmipp installer takes care of installing dependencies though conda and linking to Scipion.
29+
For developers, it becomes handy to install Xmipp in an external directory for easy integration with IDEs. By default Xmipp installer takes care of linking to Scipion.
3730

3831
The first step is to download Xmipp sources:
3932

4033
`git clone https://github.com/I2PC/xmipp.git`
4134

4235
`cd xmipp`
4336

44-
Then all child repositories need to be fetched, with an optional git branch parameter. For repositories where the branch does not exist, devel is utilized.
37+
If you want to checkout an scpecific branch use the following command. For repositories where the branch does not exist, devel is utilized.
4538

46-
`./xmipp getSources [-b branch]`
47-
48-
Install the Scipion plugin and dependencies
49-
50-
`scipion3 installp -p src/scipion-em-xmipp/ --devel`
39+
`./xmipp getSources -b branch`
5140

5241
Compile Xmipp
5342

5443
`scipion3 run ./xmipp`
5544

5645
Refer to `./xmipp --help` for additional info on the compilation process and possible customizations.
5746

47+
Install the Scipion plugin.
48+
49+
`scipion3 installp -p src/scipion-em-xmipp/ --devel`
50+
5851
#### Integrating with Visual Studio Code
5952
The CMake based installation script can be tightly integrated with any modern IDE. This section shows the procedure for Visual Studio Code (VSCode).
6053

cmake/xmipp.bashrc.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export PATH=@XMIPP_HOME@/@CMAKE_INSTALL_BINDIR@:$PATH
66
export LD_LIBRARY_PATH=@XMIPP_HOME@/@CMAKE_INSTALL_LIBDIR@:@XMIPP_HOME@/bindings/python:@PREFIX_LIB_PATH@:$LD_LIBRARY_PATH
77
export PYTHONPATH=@XMIPP_HOME@/bindings/python:@XMIPP_HOME@/pylib:$PYTHONPATH
88
export MATLABPATH=@XMIPP_HOME@/bindings/matlab:$MATLABPATH
9+
export XMIPP_SRC=@PROJECT_SOURCE_DIR@/src
910

1011
alias x='xmipp'
1112
alias xsj='xmipp_showj'

installer/constants/config.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
# This is not used in cmake
5555
__CONDA_PREFIX = 'CONDA_PREFIX'
5656
__XMIPP_CUDA_BIN = 'XMIPP_CUDA_BIN'
57+
__DEFAULT_CUDA_BIN = '/usr/local/cuda/bin'
58+
__NVCC_EXE = 'nvcc'
5759
__TUNE_FLAG='-mtune=native'
5860

5961
# Config file variable structure
@@ -81,6 +83,25 @@ def __getPrefixPath() -> Optional[str]:
8183
"""
8284
return os.environ.get(__CONDA_PREFIX)
8385

86+
def __getCudaCompiler() -> Optional[str]:
87+
"""
88+
### This function returns the path for the CUDA compiller
89+
90+
#### Returns:
91+
- (str | None): Path for the NVCC executable
92+
"""
93+
nvcc = os.environ.get(__XMIPP_CUDA_BIN)
94+
95+
if nvcc is None and os.path.exists(__DEFAULT_CUDA_BIN):
96+
nvcc = __DEFAULT_CUDA_BIN
97+
98+
if nvcc is not None:
99+
nvcc = os.path.join(nvcc, __NVCC_EXE)
100+
101+
return nvcc
102+
103+
104+
84105
ON = 'ON'
85106
OFF = 'OFF'
86107
CONFIG_DEFAULT_VALUES = {
@@ -93,7 +114,7 @@ def __getPrefixPath() -> Optional[str]:
93114
CMAKE_INSTALL_PREFIX: INSTALL_PATH,
94115
__CC_FLAGS: __TUNE_FLAG,
95116
__CXX_FLAGS: __TUNE_FLAG,
96-
CUDA_COMPILER: None,
117+
CUDA_COMPILER: __getCudaCompiler(),
97118
__PREFIX_PATH: __getPrefixPath(),
98119
__MPI_HOME: None,
99120
__PYTHON_HOME: None,
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/***************************************************************************
2+
*
3+
* Authors: J.L. Vilas
4+
*
5+
* Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
6+
*
7+
* This program is free software; you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation; either version 2 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program; if not, write to the Free Software
19+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20+
* 02111-1307 USA
21+
*
22+
* All comments concerning this program package may be sent to the
23+
* e-mail address '[email protected]'
24+
***************************************************************************/
25+
26+
#include <tomo/tomo_average_subtomos.h>
27+
28+
RUN_XMIPP_PROGRAM(ProgAverageSubtomos)

src/xmipp/applications/scripts/denoising_tv/denoising_tv.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def tigreDenoisingTV(self):
9898

9999
tomo = mrcfile.read(self.fnTomo)
100100

101-
denoisedTomo = im_3d_denoise.im3ddenoise(tomo, iter=self.iterations, lmbda=self.lmbda, gpuids=None)
101+
denoisedTomo = im_3d_denoise.im3ddenoise(np.array(tomo, dtype=np.float32), iter=self.iterations, lmbda=self.lmbda, gpuids=None)
102102

103103
with mrcfile.new(self.fnOut, overwrite=True) as mrc:
104104
mrc.set_data(denoisedTomo)
@@ -133,4 +133,4 @@ def readVolTomo(self):
133133
scipion xmipp_denoising_tv -g 0
134134
'''
135135
exitCode=DenoisingTV().tryRun()
136-
sys.exit(exitCode)
136+
sys.exit(exitCode)

0 commit comments

Comments
 (0)