21 #include <utility/exit.hh>
23 #include <utility/string_util.hh>
25 #include <utility/vector1.hh>
29 namespace conformation {
34 for (
Size i=1; i<=6; ++i ) {
203 std::replace( dof_line.begin(), dof_line.end(),
')',
' ' );
204 std::istringstream l( dof_line );
208 if ( l.fail() )
break;
214 if ( split[1] ==
"x" ) dof_type =
X_DOF;
215 if ( split[1] ==
"y" ) dof_type =
Y_DOF;
216 if ( split[1] ==
"z" ) dof_type =
Z_DOF;
217 if ( split[1] ==
"angle_x" ) dof_type =
X_ANGLE_DOF;
218 if ( split[1] ==
"angle_y" ) dof_type =
Y_ANGLE_DOF;
219 if ( split[1] ==
"angle_z" ) dof_type =
Z_ANGLE_DOF;
220 if ( dof_type == 0 ) utility_exit_with_message(
"Dof type must be x,y,z,x_angle,y_angle,z_angle...");
226 if ( split.size() == 2 ) {
229 if ( direction_split.size() >= 1 ) {
231 if ( range_split.size() >= 1 ) {
234 if ( range_split.size() == 2 && range_split[1] != range_split[2] ) {
243 if ( direction_split.size() >= 2 ) {
245 if ( range_split.size() >= 1 ) {
248 if ( range_split.size() == 2 && range_split[1] != range_split[2] ) {
257 if ( direction_split.size() == 3 ) {
258 if ( direction_split[3] ==
"n2c" ) {
260 }
else if ( direction_split[3] ==
"c2n" ) {
263 utility_exit_with_message(
"Unknown jump direction in Dof parsing...");
273 for (
Size i=1; i<=6; ++i ) {
277 if ( i == 1 ) s <<
"x";
278 if ( i == 2 ) s <<
"y";
279 if ( i == 3 ) s <<
"z";
280 if ( i == 4 ) s <<
"angle_x";
281 if ( i == 5 ) s <<
"angle_y";
282 if ( i == 6 ) s <<
"angle_z";
294 assert( dof_line.size() >= 3 );
296 for (
Size i = 3; i <= dof_line.size(); ++i ) {