Deleting part of the atoms

Dear all,

As you know by the below commands would remove the whole atom with the type of 16 grouped in dHn1;

group dHn1 type 16
delete_bonds all atom 16 remove
delete_atoms group dHn1

Actually part of the atom 16’s in my system have bond with an atom called n3 and another part of them have bond with atom called m3.

Now, I was wondering how I can removed only those that have bond with the atom called n3?

Thanks.

Best regards,

Henrik

Dear all,

As you know by the below commands would remove the whole atom with the type
of 16 grouped in dHn1;

group dHn1 type 16
delete_bonds all atom 16 remove
delete_atoms group dHn1

Actually part of the atom 16's in my system have bond with an atom called n3
and another part of them have bond with atom called m3.

in LAMMPS atoms have no names, only atom ids, which must be numbers >= 0.

axel.

Thank you and sorry for the inconvenience. I am rewriting my question below again;

Thank you and sorry for the inconvenience. I am rewriting my question below
again;

[...]

I mean part of the atoms with type 16 have bond with an atom with type 7 and
the rest have bond with with an atom with type 9, now I want to remove only
those atom 16's which have bond with the atom with type 7.
Or in other words, how to include the atom 16's which have bond with the
atom with type 7 in one group and exclude the rest.

please note, that LAMMPS is a molecular *simulator* and not meant to
be used as a generic molecular *editor*. system manipulations in
LAMMPS are usually very complex, since all data structures are
distributed across MPI ranks and thus complicated communication
patterns are require to do most manipulations of the system and
topology.

there are special tools for that, that are *much* easier to use.
please see http://lammps.sandia.gov/prepost.html for some examples.

axel.