32 addUsageLine(
"Deform a PDB according to a list of SPH deformation coefficients");
34 addParamsLine(
"--clnm <metadata_file> : List of deformation coefficients");
36 addParamsLine(
"[--center_mass] : Center the PDB according with its center of mass");
37 addParamsLine(
"[--boxsize <b=0> ] : Box size of the volume where the PDB was fitted");
38 addParamsLine(
"[--sr <s=1> ] : Sampling rate of the volume where the PDB was fitted");
39 addExampleLine(
"xmipp_pdb_sph_deform --pdb 2tbv.pdb -o 2tbv_deformed.pdb --clnm coefficients.txt");
56 <<
"PDB: " << fn_pdb << std::endl
57 <<
"Coefficient list: " << fn_sph << std::endl
58 <<
"Output: " << fn_out << std::endl
72 size_t idxY0=clnm.size()/3;
98 for (
size_t idx=0; idx<idxY0; idx++)
100 double Rmax=basisParams[2];
101 double Rmax2=Rmax*Rmax;
102 double iRmax=1.0/Rmax;
120 gx += clnm[idx] *zsph;
121 gy += clnm[idx+idxY0] *zsph;
122 gz += clnm[idx+idxZ0] *zsph;
139 for(
int i = 0;
i < N; ++
i)
148 std::stringstream iss(s);
150 std::vector<double> v;
151 while (iss >> number)
159 auto vecSize = (int)(clnm.size()/3);
164 for (
int h=0; h<=basisParams[1]; h++)
166 int totalSPH = 2*h+1;
168 for (
int l=h; l<=basisParams[0]; l+=2)
170 for (
int m=0;
m<totalSPH;
m++)
185 for (
size_t a=0;
a<numAtoms;
a++)
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)
__host__ __device__ float2 floor(const float2 v)
void write(const FileName &fnPDB, const bool renumber=false)
Write rich phantom to PDB or CIF file.
void sqrt(Image< double > &op)
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
const char * getParam(const char *param, int arg=0)
void addExampleLine(const char *example, bool verbatim=true)
int verbose
Verbosity level.
std::vector< RichAtom > atomList
List of atoms.
size_t getNumberOfAtoms() const
Get number of atoms.
bool checkParam(const char *param)
void addUsageLine(const char *line, bool verbatim=false)
void addParamsLine(const String &line)