41 addExampleLine(
" xmipp_pdb_label_from_volume --pdb 1o7d.pdb --vol volume.vol -o pdb_label.pdb --sampling 1.6");
45 addParamsLine(
" [--mask <vol_file=\"\">] : Input mask (to calculate inside mask)");
47 addParamsLine(
" --sampling <Ts=1> : Sampling rate (Angstroms/pixel)");
48 addParamsLine(
" [--origin <...>] : Origin of the volume --origin x y z");
49 addParamsLine(
" [--radius <radius=0.8>] : Considered as radius of the atom (Angstroms)");
50 addParamsLine(
" [--md <output=\"params.xmd\">] : Save mean and absolute mean output");
73 std::cout <<
"PDB file: " <<
fn_pdb << std::endl
74 <<
"Output: " <<
fn_out << std::endl
75 <<
"Sampling rate: " <<
Ts << std::endl
79 std::cout << std::endl
80 <<
"Radius: " <<
radius << std::endl;
135 double suma=0, sumaP=0;
137 for (
const auto& atomIn : pdbIn.
atomList)
139 const auto&
x = atomIn.x;
140 const auto&
y = atomIn.y;
141 const auto&
z = atomIn.z;
168 for (
int k = k0;
k <= kF;
k++)
170 double zdiff=
ZZ(r) -
k;
171 double zdiff2=zdiff*zdiff;
172 for (
int i = i0;
i <= iF;
i++)
174 double ydiff=
YY(r) -
i;
175 double zydiff2=zdiff2+ydiff*ydiff;
176 for (
int j = j0;
j <= jF;
j++)
178 double xdiff=
XX(r) -
j;
179 double rdiffModule2=zydiff2+xdiff*xdiff;
182 if ( (rdiffModule2<radius2 || (
k==ka &&
i==ia &&
j==ja)) && (
inputMask(
k,
i ,
j)>0.00001) )
200 if ( (rdiffModule2<radius2) || (
k==ka &&
i==ia &&
j==ja))
241 auto atomOut = atomIn;
242 atomOut.occupancy = atomS;
246 double mean = suma/numA;
247 double meanA = sumaP/numA;
248 std::cout <<
"mean value: = " << mean << std::endl;
249 std::cout <<
"absolute mean value: = " << meanA << std::endl;
void read(const FileName &fnPDB, const bool pseudoatoms=false, const double threshold=0.0)
Read rich phantom from either a PDB of CIF file.
double getDoubleParam(const char *param, int arg=0)
void write(const FileName &fnPDB, const bool renumber=false)
Write rich phantom to PDB or CIF file.
void getListParam(const char *param, StringVector &list)
ql0001_ & k(htemp+1),(cvec+1),(atemp+1),(bj+1),(bl+1),(bu+1),(x+1),(clamda+1), &iout, infoqp, &zero,(w+1), &lenw,(iw+1), &leniw, &glob_grd.epsmac
void computeProteinGeometry()
#define A3D_ELEM(V, k, i, j)
const char * getParam(const char *param, int arg=0)
MultidimArray< double > inputVol
void addExampleLine(const char *example, bool verbatim=true)
int verbose
Verbosity level.
MultidimArray< double > inputMask
std::vector< RichAtom > atomList
List of atoms.
#define VECTOR_R3(v, x, y, z)
int textToInteger(const char *str)
bool checkParam(const char *param)
int read(const FileName &name, DataMode datamode=DATA, size_t select_img=ALL_IMAGES, bool mapData=false, int mode=WRITE_READONLY)
void addUsageLine(const char *line, bool verbatim=false)
void addAtom(const RichAtom &atom)
Add Atom.
void addParamsLine(const String &line)