- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]

From: David A Case <dacase.chem.rutgers.edu>

Date: Sun, 15 Aug 2021 21:02:43 -0400

On Thu, Aug 12, 2021, Vaibhav Dixit wrote:

*>nab-script.nab
*

*>----------------------
*

*>molecule m;
*

*>m = getpdb( "test3.pdb" );
*

*>matrix trans4 ( m, "::FE’", 0.0 );
*

*>putpdb( "nab-test3.pdb", m );
*

*>-------------------
*

The function trans4() returns a matrix that effects a translation along a

certain axis by a certain distance. So you need something like this:

matrix mat;

...

mat = trans4( m, string1, string2, distance );

Here string one is an atom expression that gives the tail of the vector,

and string2 gives the head. Distance is the distance to move, so a distance

of 0.0 just gives a no-op matrix.

To *use* this matrix, you have to give it to transformmol:

transformmol( mat, m, string3 );

Here string3 tells the code which atoms should be moved; sending NULL there

will move everything.

If you just want to put the iron atom at the origin, using alignframe()

is much simpler. But there may be no need to do this if your goal is to

rotate certain atoms by some amount about some bond: rot4() handles that

task, with no need to place any atoms at the origin.

There are, to be sure, not many examples in the manual. But you can see an

example of rot4 on p. 843.

....dac

_______________________________________________

AMBER mailing list

AMBER.ambermd.org

http://lists.ambermd.org/mailman/listinfo/amber

Received on Sun Aug 15 2021 - 18:30:02 PDT

Date: Sun, 15 Aug 2021 21:02:43 -0400

On Thu, Aug 12, 2021, Vaibhav Dixit wrote:

The function trans4() returns a matrix that effects a translation along a

certain axis by a certain distance. So you need something like this:

matrix mat;

...

mat = trans4( m, string1, string2, distance );

Here string one is an atom expression that gives the tail of the vector,

and string2 gives the head. Distance is the distance to move, so a distance

of 0.0 just gives a no-op matrix.

To *use* this matrix, you have to give it to transformmol:

transformmol( mat, m, string3 );

Here string3 tells the code which atoms should be moved; sending NULL there

will move everything.

If you just want to put the iron atom at the origin, using alignframe()

is much simpler. But there may be no need to do this if your goal is to

rotate certain atoms by some amount about some bond: rot4() handles that

task, with no need to place any atoms at the origin.

There are, to be sure, not many examples in the manual. But you can see an

example of rot4 on p. 843.

....dac

_______________________________________________

AMBER mailing list

AMBER.ambermd.org

http://lists.ambermd.org/mailman/listinfo/amber

Received on Sun Aug 15 2021 - 18:30:02 PDT

Custom Search