Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Oleksii Turkot
CrystFEL
Commits
77e9c97e
Commit
77e9c97e
authored
Mar 31, 2010
by
Thomas White
Browse files
indexamajig: Add --pdb option
parent
fe13ba95
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/indexamajig.c
View file @
77e9c97e
...
...
@@ -77,8 +77,9 @@ static void show_help(const char *s)
" --no-match Don't attempt to match the indexed cell to the
\n
"
" model, just proceed with the one generated by the
\n
"
" auto-indexing procedure.
\n
"
" --intensities=<file> Specify file containing reflection intensities
\n
"
" to use.
\n
"
" --intensities=<file> Specify file containing reflection intensities
\n
"
" to use when simulating.
\n
"
" -p, --pdb=<file> PDB file from which to get the unit cell to match.
\n
"
);
}
...
...
@@ -194,6 +195,7 @@ int main(int argc, char *argv[])
double
*
intensities
=
NULL
;
char
*
intfile
=
NULL
;
unsigned
int
*
counts
=
NULL
;
char
*
pdb
=
NULL
;
/* Long options */
const
struct
option
longopts
[]
=
{
...
...
@@ -212,11 +214,12 @@ int main(int argc, char *argv[])
{
"verbose"
,
0
,
&
config_verbose
,
1
},
{
"alternate"
,
0
,
&
config_alternate
,
1
},
{
"intensities"
,
1
,
NULL
,
'q'
},
{
"pdb"
,
1
,
NULL
,
'p'
},
{
0
,
0
,
NULL
,
0
}
};
/* Short options */
while
((
c
=
getopt_long
(
argc
,
argv
,
"hi:w"
,
longopts
,
NULL
))
!=
-
1
)
{
while
((
c
=
getopt_long
(
argc
,
argv
,
"hi:w
p:
"
,
longopts
,
NULL
))
!=
-
1
)
{
switch
(
c
)
{
case
'h'
:
{
...
...
@@ -239,6 +242,11 @@ int main(int argc, char *argv[])
break
;
}
case
'p'
:
{
pdb
=
strdup
(
optarg
);
break
;
}
case
0
:
{
break
;
}
...
...
@@ -271,6 +279,10 @@ int main(int argc, char *argv[])
counts
=
NULL
;
}
if
(
pdb
==
NULL
)
{
pdb
=
strdup
(
"molecule.pdb"
);
}
if
(
indm_str
==
NULL
)
{
STATUS
(
"You didn't specify an indexing method, so I won't"
" try to index anything.
\n
"
...
...
@@ -287,7 +299,8 @@ int main(int argc, char *argv[])
}
free
(
indm_str
);
cell
=
load_cell_from_pdb
(
"molecule.pdb"
);
cell
=
load_cell_from_pdb
(
pdb
);
free
(
pdb
);
if
(
cell
==
NULL
)
{
ERROR
(
"Couldn't read unit cell (from molecule.pdb)
\n
"
);
return
1
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment