 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
34 for ( mol = molgroup->
mol; mol; mol = mol->
next )
35 for( res = mol->
res; res; res = res->
next )
36 for ( atom = res->
atom; atom; atom = atom->
next )
40 cout <<
"Atoms selected: " << n << endl << endl;
53 if ( selstr ==
"all" )
56 long i, j, len(selstr.
length());
67 for ( i=0; i<len; ++i ) {
68 if ( selstr[i] ==
'#' ) {
70 while ( i<len && selstr[i] !=
':' && selstr[i] !=
'@' ) ++i;
71 mol_id = selstr.
substr(j, i-1);
73 if ( selstr[i] ==
':' ) {
75 while ( i<len && selstr[i] !=
'@' ) ++i;
76 res_id = selstr.
substr(j, i-1);
78 if ( selstr[i] ==
'@' ) {
79 atom_id = selstr.
substr(++i, len-1);
84 cout <<
"Selection identifiers:" << endl;
86 cout <<
"Model: " << mol_id << endl;
88 cout <<
"Residue: " << res_id << endl;
90 cout <<
"Atom: " << atom_id << endl;
94 for ( mol = molgroup->
mol; mol; mol = mol->
next ) {
96 if ( mol->
id == mol_id ) mol->
sel = 1;
99 for( res = mol->
res; res; res = res->
next ) {
102 if ( strstr(res_id.
c_str(), res->
type) ) i = 1;
106 for ( atom = res->
atom; atom; atom = atom->
next ) {
109 if ( strstr(atom->
type, atom_id.
c_str()) ) atom->
sel = 1;
132 for ( mol = molgroup->
mol; mol; mol = mol->
next ) {
134 for( res = mol->
res; res; res = res->
next )
135 for ( atom = res->
atom; atom; atom = atom->
next, n++ )
154 for ( mol = molgroup->
mol; mol; mol = mol->
next )
155 for( res = mol->
res; res; res = res->
next )
156 for ( atom = res->
atom; atom; atom = atom->
next, n++ )
174 cout <<
"Selecting chains: " << chains << endl;
176 for ( mol = molgroup->
mol; mol; mol = mol->
next ) {
197 if ( ( rmin < 0 ) && ( rmax > 1000 ) )
return 0;
206 cout <<
"Selecting ring: " << rmin <<
" " << rmax << endl;
208 for ( mol = molgroup->
mol; mol; mol = mol->
next ) {
209 for( res = mol->
res; res; res = res->
next ) {
211 for ( atom = res->
atom; atom; atom = atom->
next ) {
214 if ( ( d > rmin ) && ( d < rmax ) ) sel = 1;
217 for ( atom = res->
atom; atom; atom = atom->
next )
240 cout <<
"Selecting atoms: " << min <<
" - " << max << endl;
242 for ( mol = molgroup->
mol; mol; mol = mol->
next ) {
243 for( res = mol->
res; res; res = res->
next ) {
244 for ( atom = res->
atom; atom; atom = atom->
next ) {
246 if ( atom->
coord[0] < min[0] || atom->
coord[0] > max[0] ||
247 atom->
coord[1] < min[1] || atom->
coord[1] > max[1] ||
248 atom->
coord[2] < min[2] || atom->
coord[2] > max[2] )
long molgroup_select_all(Bmolgroup *molgroup)
Sets selection for all atoms.
int molgroup_coor_select_ring(Bmolgroup *molgroup, double rmin, double rmax)
Selects atoms in a ring.
Library routines to select atomic coordinates.
long molgroup_deselect_all(Bmolgroup *molgroup)
Unsets selection for all atoms.
Header file for reading residue property files.
int molgroup_coor_select(Bmolgroup *molgroup, Vector3< double > min, Vector3< double > max)
Selects atoms within a box.
long molgroup_select(Bmolgroup *molgroup, Bstring selstr)
Sets selection based on a specification.
Header file for reading reflection files.
long molgroup_atoms_selected(Bmolgroup *molgroup)
Returns the number of atoms selected.
Header file for reading atom property files.
Header file for general utilities.
Bstring substr(long start, long len)
Header file for sequence utilities.
int molgroup_select_chains(Bmolgroup *molgroup, Bstring chains)
Selects molecules.
Generalized matrix class.
Header file for generalized linked list functions.
bool contains(const Bstring &s)
Library routines used for atomic coordinates.