ah, I realize that when I wrote "pytraj.select_atoms", I was not aware of
cpptraj's "select" command.
So this is definitely the source of your confusion.
Hai
On Mon, Aug 12, 2019 at 10:45 AM Hai Nguyen <nhai.qn.gmail.com> wrote:
> > It seems like the cpptraj numbering starting from 1 is the correct one
> but I want to double check.
>
> I might be wrong but I think in AMBER interface, the index is 1-based.
> In pytraj, if the return value is *not* string, the index is 0-based.
>
> > pt.select_atoms(':1', ...)
>
> In this case, the return value is a list of int with 0-based, and the
> residue selection follow AMBER's selection syntax (1-based).
>
> cheers.
> Hai
>
> On Mon, Aug 12, 2019 at 10:38 AM Rosellen, Martin <
> martin.rosellen.16.ucl.ac.uk> wrote:
>
>> Dear Amber Users,
>>
>> I am writing a script to automate the set up of configuration files for
>> umbrella sampling runs. I figured that cpptraj uses different atom
>> numbering than pytraj:
>>
>> CPPTRAJ: Trajectory Analysis. V18.01
>> ___ ___ ___ ___
>> | \/ | \/ | \/ |
>> _|_/\_|_/\_|_/\_|_
>>
>> | Date/time: 08/12/19 15:24:53
>> | Available memory: 11.825 GB
>>
>> Loading previous history from log 'cpptraj.log'
>> > parm WT.prmtop
>> [parm WT.prmtop]
>> Reading 'WT.prmtop' as Amber Topology
>> Radius Set: H(N)-modified Bondi radii (mbondi2)
>> > trajin WT.inpcrd
>> [trajin WT.inpcrd]
>> Reading 'WT.inpcrd' as Amber Restart
>> > select :1
>> [select :1]
>> Selected 21 atoms.
>> Selected= 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
>>
>>
>> Python 3.7.3 (default, Mar 27 2019, 16:54:48)
>> [Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> import pytraj as pt
>> >>> pdb = pt.load('WT.inpcrd','WT.prmtop')
>> >>> print(pt.select_atoms(':1', pdb.top<http://pdb.top>))
>> [ 0 1 2 ... 18 19 20]
>>
>> What numbering should I use in the umbrella restraint files? I mean the
>> ones that look like this:
>>
>> Harmonic restraints for 120 deg
>> &rst
>> iat=9,15,17,19,
>> r1=-60.0, r2=120.0, r3=120.0, r4=300.0,
>> rk2=200.0, rk3=200.0,
>> /
>>
>> It seems like the cpptraj numbering starting from 1 is the correct one
>> but I want to double check.
>>
>> cheers
>> Martin
>> _______________________________________________
>> AMBER mailing list
>> AMBER.ambermd.org
>> http://lists.ambermd.org/mailman/listinfo/amber
>>
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Aug 12 2019 - 08:00:04 PDT